My goal is to transform a set of objects id:., name:., parent:.I think the way to achieve this is: for each object to add, if there is no parent, add it to the output json, at the top; if there is a parent, find where the parent is in the output json.
![]() To do this, I was looking for a way to retrieve the path of an object, like function findpathinObject(key:string, value:string, object:iSuperObject):string which would return the path of the value found. In my exampIe, findpathinObject(parent, 0003.1, newObject) would return items2.items0 Is this a good approach Is there something that resolves my issue without making a new function the closest Ive seen is this SuperObject - Extract All but I dont know if that can be changed to return the path it is looking in, or the path where it finally found the value. Thanks delphi séarch superobject share imprové this question askéd Nov 14 18 at 5:13 costateixeira costateixeira 39 7 curious about why the question was downvoted after the very detailed description of the problem and the research I did trying to get to a solution. Thanks delphi séarch superobject share imprové this question askéd Nov 14 18 at 5:13 costateixeira costateixeira 39 7 Im using SuperObject to create and manipulate a simple hierarchical structure in JSON. Thanks delphi séarch superobject delphi séarch superobject share imprové this question askéd Nov 14 18 at 5:13 costateixeira costateixeira 39 7 share improve this question asked Nov 14 18 at 5:13 costateixeira costateixeira 39 7 share improve this question share improve this question asked Nov 14 18 at 5:13 costateixeira costateixeira 39 7 asked Nov 14 18 at 5:13 costateixeira costateixeira 39 7 asked Nov 14 18 at 5:13 costateixeira costateixeira 39 7 39 7 curious about why the question was downvoted after the very detailed description of the problem and the research I did trying to get to a solution. However, the codé ás it is proposed thére will move thé deleted folder intó the recycIe bin which is something you wiIl want to avóid more often thán not. Attr and faDiréctory ) 0 ) and ( sRec. ![]() Name. ) then RémoveDirectory ( t sRec. Name ); until FindNéxt ( sRec ) 0; FindClose ( sRec ); end; Result: Windows. RemoveDirectory ( PChár ( t ) ); except ResuIt: False; end; énd.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |