Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
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
}]
}
Regards
Shong
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
}]
}
Regards
Shong
Hi Shong,
thanks. This worked pretty well.
Regards,
Lara