UNPKG

sc-react-ions

Version:

An open source set of React components that implement Ambassador's Design and UX patterns.

5 lines (3 loc) 246 B
import { fromJS, Map } from 'immutable' // Receives an immutable map of a schema, then assigns the nested values to the keys. export const formSchemaToKeyVal = schema => fromJS(schema).flatMap((value, key) => Map({ [key]: value.get('value') }))