Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

how do i extract few items/values from a json and create a new json?

how do i extract few items/values from a json and create a new json?

New Contributor

I have the below json,how do i filter or extract only the status_code,component and the timestamp from the below json and create a new json.

json:{"type":"Logging","version":1,"message":{"logmessage":"user=AnonymousUser method=GET request_path=/iafapp/v1/health_check/ query_params=[] status_code=200 status_text=OK request.body=b'' response.body={'component': 'IAF', 'data': {'status': 'pass', 'start_timestamp': 1553456281.0249605, 'end_timestamp': 1553456281.4729712, 'data': [{'component': 'NETBOX', 'status': 'pass'}]}, 'timestamp': 1553456281.472985}","uuid":"00ca3e70-bf1b-407b-ae1e-4352f5231c61"}}


Your help will be much appreciated.

Don't have an account?
Coming from Hortonworks? Activate your account here