Hi there!
I am trying to map an external XSD to an internal JSON schema.
Somewhere in that external XSD, there is a placeholder where key-value attributes are passed:
the values in additionalTradeItemClassificationPropertyCode are the keys which correspond with an attribute defined in our internal JSON, for example:
The value in propertyCode corresponds with the value of our JSON attribute.
So for the example above, we know that sdsLegallyRequiredIndicator equals to "NOT_APPLICABLE".
I started using the proposed solution to use an equal function, comparing the key with the additionalTradeItemClassificationPropertyCode and then to filter that result and map it to the correct attribute in my internal JSON:
That works perfectly fine, for a limited set of those mappings.
I have +/- 4500 of those key-value attributes I need to map, so it would seem I need to create 4500 constants, 4500 equal functions, 4500 filters,... not to mention the connectors.
That is a lot of work, therefore I was wondering whether there would be a more scalable solution where I could maybe reuse certain components? Maybe not work with 4500 constants, but having a list in some way?
Many thanks in advance for the help,
Kind regards,
Daan