I have a Python 2.7 script that looks like this:
import requests
url = "https://example.net/rest/v1/m/4513452615415"
querystring = {"client":"wzas"}
payload = "{\r\n \"sss\" : \""+msse+"\",\r\n\"VisitorId\":\""+mcid+"\",\r\n \"thirdPartyId\": \""+tracking_id+"\",\r\n \"contentAsJson\": \"true\",\r\n \"mbssParameters\": \r\n { \r\n \"mboxMCGLH\": \"6\" \r\n }\r\n}\r\n"
headers = {
'content-type': "application/json",
'cache-control': "no-cache",
'postman-token': "289f645d-1543-e6df-87fb-1cef88f110c5"
}
response = requests.request("POST", url, data=payload, headers=headers, params=querystring)
return (response.text)
The output is sent to a CSV file and looks like this:
{"thirdPartyId":"559yZDIIs3XvFpLPhvjexK7/jYlT7ZwJXBpNc/ZS4A1saWdodG5pbmdzZWVkcw==","marketingId":"89137879111811717593914206190290951066814","edgeHost":"mrdge21.example.net","content":{"tnsVal":"931113:4:0","contentName":"examplecontent","revenue":14},"sessionId":"4513452615415"}
How would I only output the contentName and tnsVal ?
Thanks in advance Nick