Hi All,
I am building up a JSON object and need to add the odata.etag property like so:
addProperty(variables('payload'), '@odata.etag', body('Get_Item')?['odata.etag'])
but I get the following error message:
Unable to process template language expressions in action 'Compose_4' inputs at line '1' and column '2957': 'The provided property name '@odata.etag' has these invalid characters '.'. The name cannot contain any of the following symbols: '[, ], .'.'.
I've tried stringifying it, puting it in a compose, setting the property rather than adding it, but it's all the same.
Anyone know of a workaround?
Thanks
Hi @LKS,
Since the "." is an invalid character to be added as a property name, so it is impossible to approach that directly.
As a workaround, you could add the "@odataetag" into it firstly, then use string() function convert the object to string, then use replace() function replace "@odataetag" to "@odata.etag", then use json() function convert it back to object:
addProperty(variables('payload'), '@odataetag', body('Get_Item')?['odata.etag'])
json(replace(string(outputs('Compose')),'@odataetag','@odata.etag'))
Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Michael E. Gernaey
566
Super User 2025 Season 1
David_MA
516
Super User 2025 Season 1
stampcoin
492