Convert sql object to valid Json string in node.js - Azure

前端 未结 4 863
轻奢々
轻奢々 2021-01-07 03:57

We are creating a web service in Azure service using node.js to retrieve data from SQL db. We are using ClearDB to do the same.

While retriving the data its not comm

4条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-01-07 04:42

    You don't need JSON.stringify() actually. results is already your javascript object, which represents array of json objects. Just use

    console.log(results[0].projectname);
    

提交回复
热议问题