graycoreio/daffodil

View on GitHub
libs/driver/hubspot/src/transformers/json-builder.ts

Summary

Maintainability
A
0 mins
Test Coverage
import { FieldValue } from '../models/hubspot-request';


export const jsonBuilder = (payload: Record<string, any>): FieldValue[] => Object.keys(payload).map((key) => ({ name: key, value: payload[key] }));