Sumo Logic - Extract the Key from JSON object

Sumo Logic is a useful tool to monitor the logs from multiple micro-services, it has its own query language to retrieve data from the log message. One of them is extract Key/Value from JSON object within the results.

For example, you have below log information:
date: "2019-12-14"
type: "error"
body:"{
     \"eventid\": \"XXXX-XXXX-XXXX-XXXX\",
    \"userid\": "1234567890",
    \"action\":"sample"
}"
 
You need to get the "userid" from the JSON object "body", then you can write the code as below:
| json field=body "userid" |

Comments

Popular posts from this blog

Top JavaScript courses helping you develop SPFx webPart with ReactJS and AngularJS

Effective LLM Prompting skills

Enable the Microsoft Power BI report file type (.pbix) in SharePoint Search