Im working on log of O365 via O365 API.
I have sample log look like
"o365": {
"ExtendedProperties": [
{
"Name": "UserAgent",
"Value": "Microsoft Office/15.0 (Windows NT 6.2; Microsoft Outlook 15.0.4420; Pro)"
},
{
"Name": "UserAuthenticationMethod",
"Value": "1"
},
{
"Name": "RequestType",
"Value": "OrgIdWsTrust2:process"
},
{
"Name": "ResultStatusDetail",
"Value": "Success"
}
]
}
Now i want data become
{
"o365": {
"ExtendedProperties": {
"UserAgent": "Microsoft Office/15.0 (Windows NT 6.2; Microsoft Outlook 15.0.4420; Pro)",
"UserAuthenticationMethod": "1",
"RequestType": "OrgIdWsTrust2:process",
"ResultStatusDetail": "Success"
}
}
}
Someone tell me that should be use ruby filter, but i dont know how (i dont know ruby program).
Can someone help me finish parse log Office 365 ?
P/s: The number of elements in the array (ExtendedProperties) is unknown - maybe have 3 or 5 or 7 elements.
Thanks so much!