Want to change the structure of the json string in talend

Highlighted
One Star

Want to change the structure of the json string in talend

I want to change the structure of the json string from single array format to sub array format.
And will try on several ways but all were failed,
I tried with Meta data -->File Json (Customised component) (Present on the left side panel)
Please suggest me suitable component for my requirement.

Moderator

Re: Want to change the structure of the json string in talend

Hi,
Could you please elaborate your case with an example with input and expected output values?
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
One Star

Re: Want to change the structure of the json string in talend

Previously it was like this.
"Company Id" : 5399,
    "Company Name" : "1-800 Contacts",
    "Employee Id" : 265849,
    "First Name" : "Evan",
    "Last Name" : "Lambson",
    "Title" : "Software Engineer",
    "Seniority Level" : "Engineer",
    "Reports To" : "Chris Wilsher",
    "Email" : "elambson@1800contacts.com",
    "Direct Phone" : "(801) 316-7758",
    "City" : "Draper",
    "State" : "UT",
    "Country" : "United States",
    "LinkedIn URL" : "",
    "Website" : "www.1800contacts.com",
    "Revenue (Mil)" : 255,
    "IT Budget (Mil)" : 0,
    "Number of Employees" : 1135,
    "IT Employees" : 57


and i want like this .



   "Company Id" : 5399,
   "Company Name" : "1-800 Contacts",
   "Employee Id" : 265849,
   "Website" : "www.1800contacts.com",
   "Revenue (Mil)" : 255,
   "IT Budget (Mil)" : 0,
   "Number of Employees" : 1135,
   "IT Employees" : 57
   Employees : [{
      First Name" : "Evan",
   "Last Name" : "Lambson",
   "Title" : "Software Engineer",
   "Seniority Level" : "Engineer",
   "Reports To" : "Chris Wilsher",
   "Email" : "elambson@1800contacts.com",
   "Direct Phone" : "(801) 316-7758",
   "City" : "Draper",
   "State" : "UT",
   "Country" : "United States",
   "LinkedIn URL" : ""},
    {
    First Name" : "Gupta",
   "Last Name" : "nittala",
   "Title" : "Software Engineer",
   "Seniority Level" : "Engineer",
   "Reports To" : "Chris Wilsher",
   "Email" : "elambson@1800contacts.com",
   "Direct Phone" : "(801) 316-7758",
   "City" : "Draper",
   "State" : "UT",
   "Country" : "United States",
   "LinkedIn URL" : ""
   }]



actually employee-id be per employee
One Star

Re: Want to change the structure of the json string in talend

i want to group the employee details means i want all of the employees in one array in which those are belonging to one company
similarly if i have 10 companies in my json string i want to get 10 arrays in that i need all the employees belonging to that company..

Calling Talend Open Studio Users

The first 100 community members completing the Open Studio survey win a $10 gift voucher.

Start the survey

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog

How Media Organizations Achieved Success with Data Integration

Learn how media organizations have achieved success with Data Integration

Read

Downloads and Trials

Test drive Talend's enterprise products.

Downloads