Restructure fields
Every pairing is a rename. The left side says where the value goes. The right side says where it comes from. Both are JSON Pointers.
To flatten a nested input:
/title: /book/title/author: /book/author/name/year: { source: /book/published, as: number }{ "book": { "title": "On Mapping", "author": { "name": "Hopper" }, "published": "1998" } }becomes:
{ "title": "On Mapping", "author": "Hopper", "year": 1998 }To nest a flat input, point the other way:
/book/title: /title/book/author/name: /author{ "title": "On Mapping", "author": "Hopper" }becomes:
{ "book": { "title": "On Mapping", "author": { "name": "Hopper" } } }Intermediate containers appear as needed. You never declare them.