Ask Your Question
0

Want to add a new field as prefix into nested json file.

asked 2020-05-18 23:30:23 -0500

anonymous user

Anonymous

Example.

my existing json "Customer": { "Account": [ { "acc_id": "12345", "accountNumber": { "source": "asvcdc", "value": "6757", "valueUpdatedTimestamp": "2020-02-07T17:16:16.853Z" } } ] }

Now I want to add "support" in the prefix of customer. as

"support":{

"Customer": { "Account": [ { "acc_id": "12345", "accountNumber": { "source": "asvcdc", "value": "6757", "valueUpdatedTimestamp": "2020-02-07T17:16:16.853Z" } } ] } }

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2020-05-19 09:52:54 -0500

iamontheinet gravatar image

updated 2020-05-19 09:53:12 -0500

Hi!

Use Expression Evaluator as shown below.


image description


image description


Then, you can use Field Remover to remove Customer at the root of the record.

Cheers, Dash

edit flag offensive delete link more

Comments

1

Thanks. It worked. There is one more requirement. I have this nesting in json. AssociatedParty.[apId].Entity.corporationDate and i want to convert it into this. baseParty.associatedParties.[ap_Id].organisation.organizationCreationDate Please help

sashish gravatar imagesashish ( 2020-05-20 05:41:42 -0500 )edit

Great! Please vote on this answer and ask a different questions so it's easy for others looking for similar answer/solution to find it.

iamontheinet gravatar imageiamontheinet ( 2020-05-20 08:36:50 -0500 )edit

I am not able to vote as it requires >5 points. I have posted a new question, if you can answer. header line "Deep Nested Json file consist of list and array"

sashish gravatar imagesashish ( 2020-05-27 23:09:44 -0500 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2020-05-18 23:30:23 -0500

Seen: 38 times

Last updated: May 19