- Access exclusive content
- Connect with peers
- Share your expertise
- Find support resources
08-31-2023 04:21 AM
[
{
"@odata.type": "#microsoft.graph.fileAttachment",
"@odata.mediaContentType": "image/jpeg",
"id": "AAMkADEzYjJhMzM1LTY0ODctNGUxOS05ZDc5LTQ2MWM3NzFmMTRjOABGAAAAAABaN8y0q3IrQ6fyDga7Z5M3BwBvSXHDOoi0TJ5-l2B-i9PgAAAAAAEMAADyHfSb-T8wR5Fak3aFlfaBAACPB9PLAAABEgAQAE8kDtOZeABMuRd54VyYgc4=",
},
{
"@odata.type": "#microsoft.graph.fileAttachment",
"@odata.mediaContentType": "image/png",
"id": "AAMkADEzYjJhMzM1LTY0ODctNGUxOS05ZDc5LTQ2MWM3NzFmMTRjOABGAAAAAABaN8y0q3IrQ6fyDga7Z5M3BwBvSXHDOoi0TJ5-l2B-i9PgAAAAAAEMAADyHfSb-T8wR5Fak3aFlfaBAACPB9PLAAABEgAQAI8pDv4IgY1BhJhVm9_2_E8=",
}
]
dataset = msft_o365_emails_raw |
| fields attachments as attach
| alter attachid = json_extract_scalar_array(to_json_string(arrayindex(attach, 0)) , "$.id")
Regards,
Fabio Ferreira
09-01-2023 01:51 AM
Thank you for writing to live community!
Assuming type of the field which contains above value is json, could you try this below:
| alter attachment_id = arraymap(json_extract_array(to_json_string(fieldname),"$."),json_extract_scalar("@element","$.id"))
| arrayexpand attachment_id
Hope this helps!
Please mark the response as "Accept as Solution" if it answers your query.
Regards.
09-01-2023 01:51 AM
Thank you for writing to live community!
Assuming type of the field which contains above value is json, could you try this below:
| alter attachment_id = arraymap(json_extract_array(to_json_string(fieldname),"$."),json_extract_scalar("@element","$.id"))
| arrayexpand attachment_id
Hope this helps!
Please mark the response as "Accept as Solution" if it answers your query.
Regards.
Click Accept as Solution to acknowledge that the answer to your question has been provided.
The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!
These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!
The LIVEcommunity thanks you for your participation!