joaonuno / flat-to-nested-js

Convert a hierarchy from flat to nested representation.
MIT License
79 stars 21 forks source link

Support for if parent definition is within nested object. #12

Open jungalwala opened 6 years ago

jungalwala commented 6 years ago

I have an objects with a layout like:

{
  theId: foobar
  data: {
              parent_id: bob
              moredata: baz
             }
}

Will this support the idea that the parent_id is within the structure? I tried: flatToNested = new FlatToNested( { id: 'theid', parent: 'data.parent_id' } );

joaonuno commented 6 years ago

Hi,

Currently that's not supported, it is related to what was discussed in issue #5 but I never got to implement it.