title: How to get a output in json object from azure function?
body: <p>I have written a azure function which will return data into json string format but i want data into json object so that i can directly use that array output for next step into logic app.</p>
  
  <p>azure function code - </p>
  
  <pre><code>        composeMessage = "{\"__metadata\": {\"id\": "+obj.id+",\"uri\": "+obj.uri+",\"dateForSystem\": "+obj.dateForSystem + ",\"timeForSystem\": "+obj.timeForSystem + "}";
          composeMessageList.Add(composeMessage);
          outputDerivedTableKey = string.Empty;
          startIndex = 0;
      }
       var jsonToReturn = JsonConvert.SerializeObject(composeMessageList);
      return new HttpResponseMessage(HttpStatusCode.OK) {
  Content = new StringContent(jsonToReturn, Encoding.UTF8, "application/json")
  </code></pre>
  
  <p>getting output like - </p>
  
  <pre><code>[
    "{\"__metadata\": {\"id\": ,\"uri\": ,\"type\": },\"dateForSystem\": 2019-05-17,\"timeForSystem\": 13:15:51}",
    "{\"__metadata\": {\"id\": ,\"uri\": ,\"type\": },\"dateForSystem\": 2019-05-17,\"timeForSystem\": 13:15:51}",
    "{\"__metadata\": {\"id\": ,\"uri\": ,\"type\": },\"dateForSystem\": 2019-05-17,\"timeForSystem\": 13:15:51}",
  ]
  </code></pre>
  
  <p>But I can't pass this array to foreach in logic app i'm excepting output format like below from azure function -</p>
  
  <pre><code>[
    {
      "__metadata": {
        "id": "",
        "uri": "",
        "type": ""
      },
      "dateForSystem": "2019-05-17",
      "timeForSystem": "13:15:51"
    },
     {
      "__metadata": {
        "id": "",
        "uri": "",
        "type": ""
      },
      "dateForSystem": "2019-05-17",
      "timeForSystem": "13:15:51"
    },
     {
      "__metadata": {
        "id": "",
        "uri": "",
        "type": ""
      },
      "dateForSystem": "2019-05-17",
      "timeForSystem": "13:15:51"
    },
  ]
  </code></pre>
  
  <blockquote>
    <p>How can i achieve this format output from azure function ?</p>
    
    <p>Or how to format this into logic app?</p>
  </blockquote>