Closed
Description
I'm building a JSON transformation feature using GJSON and the use case is to parse an input and generate a transformed JSON, but also including extra fields (i.e. fields/values not present in the source JSON). Is that possible with GJSON?
Example:
Given the following input (from GJSON playground):
{
"name": {"first": "Tom", "last": "Anderson"}
}
When the input is {name.last,"foo":name.first}
, the result is
{"last":"Anderson","foo":"Tom"}
But when the input is {name.last,"foo":"bar"}
, the result is:
{"last":"Anderson"}
I expected that the result would be
{"last":"Anderson","foo":"bar"}
Is there any way to achieve that?
Metadata
Assignees
Labels
No labels
Activity