my Scenario: passing the JSON data to function app to do some business functions like converting the input JSON to the correct format, for this i have used foreach loops and creating a json string.
the abopve scenario worked as expecting in local VS2017, but after publishing and while calling from logic apps it throws error.
to check manually i copied entire code into function app(Azure portal) and checked there when i called the function app, it shown some errors related to my JSON.
- Accessed JObject values with invalid key value: 0. Object property name expected.at
data[0].columns.Count
then i have added another foreach on top of the other foreach
and tried to take count as totalData["columns"].Count
- Cannot access child value on
Newtonsoft.Json.Linq.JProperty
. (when i placedata[0].columns.Count
tototalData["columns"].Count
)
can you please help me how can the function app gives output same as VS2017 output. or working with json in function app.