
Hello Foks,
I want to remove all the "non-json" text which comes before the JSON.
using a compose action, I tried the following trim and replace combinations - however the result as not as expected.
trim(replace(replace(replace(last(split(outputs('Compose'), 'TenantDomain')), ':', ''), '}', ''), '"', ''))
trim(replace(replace(replace(last(split(outputs('Compose'), 'contosoGroup.onmicrosoft.com')), ':', ''), '}', ''), '"', ''))
Please help.
Thanks,
Account : nnnnnnnn-nnnn-nnnn-nnnn-nnnnnnnnnnnn I used Substring to remove the initial part of the text, as follows:
A. Starting Position: indexOf(outputs('Raw_Data'),'[')
B.Total length: length(outputs('Raw_Data'))
C.Length (Difference): sub(outputs('Total_Length'),outputs('Starting_Position'))
Substring Connectors:
Text: Raw Data output
Starting Position: A
Lenght: C