Hi, I am having trouble generating a stats report based on JSON data containing an array. I want to produce the following report: ErrorCode ErrorMessage Count 212 The image quality is poor 1 680 The image could not be found 1 809 Document not detected 1 When I do the stats command, I do not get any results: | spath input=jsondata |stats count by "embedded.metadata.data.results{}.notifications.*" I have to know the error code value in the array in order to get any stats output. For example: | spath input=jsondata |stats count by "embedded.metadata.data.results{}.notifications.809" Result: embedded.metadata.data.results{}.notifications.809 count Document not detected 1 Here example of the json data { "_embedded": { "metadata": { "environment": { "id": "6b3dc" }, "data": { "results": [ { "documentId": "f18a20f1", "notifications": { "212": "The image quality was poor" } }, { "documentId": "f0fdf5e8c", "notifications": { "680": "The image could not be found" } }, { "documentId": "95619532", "notifications": { "809": "Document not detected" } } ] } } } } Thanks in advance for any assistance!!
... View more