Hi @pijke, your examples are not valid JSON documents. Assuming that the documents were:
{
    "tblProjects": {
        "PrID": "49835",
        "PrCode": "486732-14"
    }
}
{
    "tblProjects": r
        {
            "PrID": "49835",
            "PrCode": "486732-14"
        },
        {
            "PrID": "49836",
            "PrCode": "486741-10"
        }
    ]
}
You can determine whether the value of "tblProject" is a single object or an array by testing if this JSON query returns a value (PrID) or not.Â
jsont"tblProjects"] "PrID"]
Hi @takashi,
Thank you very much for your answer. You were right, the examples were not valid JSON, they were exerts from the original input. Your trick with the JSONExtractor worked great. When the test passes, I route it through an AttributeManager which makes it an array, so I can process them with the same routine. Otherwise I would have nearly identical processing. The screenshot below is my implementation.
2018-04-18-18-49-36-envitagis-hp.png
Thanks again!
Hi @pijke, your examples are not valid JSON documents. Assuming that the documents were:
{
    "tblProjects": {
        "PrID": "49835",
        "PrCode": "486732-14"
    }
}
{
    "tblProjects": r
        {
            "PrID": "49835",
            "PrCode": "486732-14"
        },
        {
            "PrID": "49836",
            "PrCode": "486741-10"
        }
    ]
}
You can determine whether the value of "tblProject" is a single object or an array by testing if this JSON query returns a value (PrID) or not.Â
jsont"tblProjects"] "PrID"]
If you need to extract the values of PrID and PrCode for each object finally, it might be smarter to use the JSONFragmenter.
Â