Looping through JSON with node.js

前端 未结 9 1645
感情败类
感情败类 2020-12-08 00:04

I have a JSON file which I need to iterate over, as shown below...

{
    \"device_id\": \"8020\",
    \"data\": [{
        \"Timestamp\": \"04-29-11 05:22:39         


        
9条回答
  •  再見小時候
    2020-12-08 00:49

    Not sure if it helps, but it looks like there might be a library for async iteration in node hosted here:

    https://github.com/caolan/async

    Async is a utility module which provides straight-forward, powerful functions for working with asynchronous JavaScript. Although originally designed for use with node.js, it can also be used directly in the browser.

    Async provides around 20 functions that include the usual 'functional' suspects (map, reduce, filter, forEach…) as well as some common patterns for asynchronous control flow (parallel, series, waterfall…). All these functions assume you follow the node.js convention of providing a single callback as the last argument of your async function.

提交回复
热议问题