To use toPlainObject
function from lodash:
npm install lodash
in your project directory or by including it via script tag in your html file.toPlainObject
function from lodash in your javascript code:index.tsx45 chars2 lines
or
index.tsx40 chars2 lines
toPlainObject
function on the object that you want to convert:index.tsx240 chars11 lines
Note that toPlainObject
creates a plain object with only own enumerable string keyed properties of an object.
gistlibby LogSnag