Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Lara_Zuern
Contributor III
Contributor III

tExtractJSONFields doesn't show a result

Hello,

In my data I have the following Array stored in a MongoDB:

"errorCounter": [{

    "ErrorNumber": "20",

    "Count": 1

  }, {

    "ErrorNumber": "29",

    "Count": 15

  }, {

    "ErrorNumber": "35",

    "Count": 15

  }, {

    "ErrorNumber": "39",

    "Count": 15

  }, {

    "ErrorNumber": "47",

    "Count": 1

  }, {

    "ErrorNumber": "51",

    "Count": 2

  }, {

    "ErrorNumber": "57",

    "Count": 1

  }]

Now I tried to extract the fields ErrorNumber and Count with tExtractJSONFields component.

The job worked perfectly well except Talend gave me a blank output.

For better understanding see the screenshots below.

Any suggestions?

Regards,

Lara

Labels (3)
1 Solution

Accepted Solutions
Anonymous
Not applicable

 

Hi

Try to add { in the beginning of string and ends with }, you should be able to extract the ErrorNumber value.

{

"errorCounter": [{

    "ErrorNumber": "20",

    "Count": 1

  }, {

    "ErrorNumber": "29",

    "Count": 15

  }, {

    "ErrorNumber": "35",

    "Count": 15

  }, {

    "ErrorNumber": "39",

    "Count": 15

  }, {

    "ErrorNumber": "47",

    "Count": 1

  }, {

    "ErrorNumber": "51",

    "Count": 2

  }, {

    "ErrorNumber": "57",

    "Count": 1

  }]

}

 

 

0695b00000HvrxhAAB.png 

Regards

Shong

View solution in original post

2 Replies
Anonymous
Not applicable

 

Hi

Try to add { in the beginning of string and ends with }, you should be able to extract the ErrorNumber value.

{

"errorCounter": [{

    "ErrorNumber": "20",

    "Count": 1

  }, {

    "ErrorNumber": "29",

    "Count": 15

  }, {

    "ErrorNumber": "35",

    "Count": 15

  }, {

    "ErrorNumber": "39",

    "Count": 15

  }, {

    "ErrorNumber": "47",

    "Count": 1

  }, {

    "ErrorNumber": "51",

    "Count": 2

  }, {

    "ErrorNumber": "57",

    "Count": 1

  }]

}

 

 

0695b00000HvrxhAAB.png 

Regards

Shong

Lara_Zuern
Contributor III
Contributor III
Author

Hi Shong,

 

thanks. This worked pretty well.

 

Regards,

Lara