Hi!
In the process of studying api, a vision appeared that all “nested” objects necessarily have a prefix of the identifier or the name of the parent. For example:
{
"id": 12455
"key": "weighted_value",
"name": "Weighted value",
},
{
"id": null,
"key": "weighted_value_currency",
"name": "Currency of Weighted value"
}
or
{
"id": 12485
"key": "8a48fff6d78c0a99caa41b997dc751fb660208a1",
"name": "TestMonetary"
},
{
"id": null,
"key": "8a48fff6d78c0a99caa41b997dc751fb660208a1_currency",
"name": "Currency of TestMonetary",
}
But the currency field does not fit into this pattern.
{
"id": 12454,
"key": "value",
"name": "Value"
},
{
"id": null,
"key": "currency",
"name": "Currency"
}
How is it better to “translate”, provided that I work with different organizations and each has a completely different set of fields that dynamically change and I want to parse them without tight binding to the field names.