{"expireTime":9007200821601135000,"key":"gatsby-plugin-mdx-entire-payload-add9e58c3b387c479c7604cc47ea0c1e-","val":{"mdast":{"type":"root","children":[{"type":"paragraph","children":[{"type":"strong","children":[{"type":"text","value":"type:","position":{"start":{"line":2,"column":3,"offset":3},"end":{"line":2,"column":8,"offset":8},"indent":[]}}],"position":{"start":{"line":2,"column":1,"offset":1},"end":{"line":2,"column":10,"offset":10},"indent":[]}},{"type":"text","value":" ","position":{"start":{"line":2,"column":10,"offset":10},"end":{"line":2,"column":11,"offset":11},"indent":[]}},{"type":"inlineCode","value":"(state: {result: *, entities: *}) => *","position":{"start":{"line":2,"column":11,"offset":11},"end":{"line":2,"column":51,"offset":51},"indent":[]}}],"position":{"start":{"line":2,"column":1,"offset":1},"end":{"line":2,"column":51,"offset":51},"indent":[]}},{"type":"paragraph","children":[{"type":"text","value":"Denormalize is the reverse of normalize. When given a normalized result and a set of entities\nit will reconstruct the data from the entities. You can loosly describe it as:\n","position":{"start":{"line":4,"column":1,"offset":53},"end":{"line":6,"column":1,"offset":226},"indent":[1,1]}},{"type":"inlineCode","value":"a === schema.denormalize(schema.normalize(a))","position":{"start":{"line":6,"column":1,"offset":226},"end":{"line":6,"column":48,"offset":273},"indent":[]}}],"position":{"start":{"line":4,"column":1,"offset":53},"end":{"line":6,"column":48,"offset":273},"indent":[1,1]}},{"type":"paragraph","children":[{"type":"emphasis","children":[{"type":"text","value":"Note: the result shape must match the shape of the schema","position":{"start":{"line":8,"column":2,"offset":276},"end":{"line":8,"column":59,"offset":333},"indent":[]}}],"position":{"start":{"line":8,"column":1,"offset":275},"end":{"line":8,"column":60,"offset":334},"indent":[]}}],"position":{"start":{"line":8,"column":1,"offset":275},"end":{"line":8,"column":60,"offset":334},"indent":[]}},{"type":"code","lang":"js","meta":null,"value":"function Denormalize() {\n    const person = new EntitySchema('person', {\n        shape: new ObjectSchema({})\n    });\n    const people = new ArraySchema(person);\n\n    return <JSON>\n        {people.denormalize({\n            result: ['foo', 'bar'],\n            entities: {\n                person: {\n                    foo: {id: 'foo', name: 'fooschia'},\n                    bar: {id: 'bar', name: 'bartholomew'}\n                }\n            }\n        })}\n    </JSON>\n}\n","position":{"start":{"line":10,"column":1,"offset":336},"end":{"line":30,"column":4,"offset":814},"indent":[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]}},{"type":"export","value":"export const _frontmatter = {}","position":{"start":{"line":34,"column":1,"offset":818},"end":{"line":34,"column":31,"offset":848},"indent":[]}}],"position":{"start":{"line":1,"column":1,"offset":0},"end":{"line":34,"column":31,"offset":848}}},"scopeImports":[],"scopeIdentifiers":[],"rawMDXOutput":"/* @jsx mdx */\nimport { mdx } from '@mdx-js/react';\n/* @jsx mdx */\n\nexport const _frontmatter = {};\nconst makeShortcode = name => function MDXDefaultShortcode(props) {\n  console.warn(\"Component \" + name + \" was not imported, exported, or provided by MDXProvider as global scope\")\n  return <div {...props}/>\n};\n\nconst layoutProps = {\n  _frontmatter\n};\nconst MDXLayout = \"wrapper\"\nexport default function MDXContent({\n  components,\n  ...props\n}) {\n  return <MDXLayout {...layoutProps} {...props} components={components} mdxType=\"MDXLayout\">\n    <p><strong parentName=\"p\">{`type:`}</strong>{` `}<inlineCode parentName=\"p\">{`(state: {result: *, entities: *}) => *`}</inlineCode></p>\n    <p>{`Denormalize is the reverse of normalize. When given a normalized result and a set of entities\nit will reconstruct the data from the entities. You can loosly describe it as:\n`}<inlineCode parentName=\"p\">{`a === schema.denormalize(schema.normalize(a))`}</inlineCode></p>\n    <p><em parentName=\"p\">{`Note: the result shape must match the shape of the schema`}</em></p>\n    <pre><code parentName=\"pre\" {...{\n        \"className\": \"language-js\"\n      }}>{`function Denormalize() {\n    const person = new EntitySchema('person', {\n        shape: new ObjectSchema({})\n    });\n    const people = new ArraySchema(person);\n\n    return <JSON>\n        {people.denormalize({\n            result: ['foo', 'bar'],\n            entities: {\n                person: {\n                    foo: {id: 'foo', name: 'fooschia'},\n                    bar: {id: 'bar', name: 'bartholomew'}\n                }\n            }\n        })}\n    </JSON>\n}\n\n`}</code></pre>\n\n    </MDXLayout>;\n}\n\n;\nMDXContent.isMDXComponent = true;"}}