【问题标题】:Fetching specific JSON data using Node.js使用 Node.js 获取特定的 JSON 数据
【发布时间】:2015-04-13 06:25:44
【问题描述】:

我在 MongoDB 中存储了各种推文的数据,并以 JSON 格式显示,如下所示。我只想从此批量数据中获取位置名称并使用 node.js 将其显示在另一个页面上。

谁能帮帮我,这将是一个很大的帮助

{
    "_id": "5524d1c72d02a4bce134cabd",
    "id": 585697991878639600,
    "created_at": "Wed Apr 08 06:57:37 +0000 2015",
    "id_str": "585697991878639618",
    "text": "Friends follow @ArtistAloud page join this contest and win cool fk voucher #AAMA2014 @Mika0562  
             @genver1 @BabuBeg @sunitakatyal @sweet_isha1",
    "source": "<a href=\"http://twitter.com\" rel=\"nofollow\">Twitter Web Client</a>",
    "truncated": false,
    "in_reply_to_status_id": null,
    "in_reply_to_status_id_str": null,
    "in_reply_to_user_id": null,
    "in_reply_to_user_id_str": null,
    "in_reply_to_screen_name": null,
    "user": {
      "id": 141550730,
      "id_str": "141550730",
      "name": "Anuradha Chhabra",
      "screen_name": "freeky9219",
      "location": "Mumbai",
      "url": null,
      "description": null,
      "protected": false,
      "verified": false,
      "followers_count": 1274,
      "friends_count": 1692,
      "listed_count": 11,
      "favourites_count": 24669,
      "statuses_count": 57491,
      "created_at": "Sat May 08 11:10:09 +0000 2010",
      "utc_offset": null,
      "time_zone": null,
      "geo_enabled": true,
      "lang": "en",   
 },
{
    "_id": "552b5f3081d03fdca14c0d74",
    "id": 587499514560405500,
    "created_at": "Mon Apr 13 06:16:14 +0000 2015",
    "id_str": "587499514560405504",
    "text": "RT @ErnestoRiley: Look, friends tease each other. It's how we show love.\nSo everyone just Chill..\nAnd be respectful with your comments ðŸŒ",
    "source": "<a href=\"http://twitter.com/download/iphone\" rel=\"nofollow\">Twitter for iPhone</a>",
    "truncated": false,
    "in_reply_to_status_id": null,
    "in_reply_to_status_id_str": null,
    "in_reply_to_user_id": null,
    "in_reply_to_user_id_str": null,
    "in_reply_to_screen_name": null,
    "user": {
      "id": 2239133156,
      "id_str": "2239133156",
      "name": "21.04.15《",
      "screen_name": "justlorina",
      "location": "Sophia & Katie â¤ï¸ ",
      "url": "http://Instagram.com/justlorina_",
      "description": "The Vampire Diaries is the Story of Elena falling in love with Damon -LJ. Smith • #PLL #TW addicted • I met Ian 17/18 May 2014 • [Books||Shows||Movies||Music]",
      "protected": false,
      "verified": false,
      "followers_count": 3440,
      "friends_count": 998,
      "listed_count": 21,
      "favourites_count": 17533,
      "statuses_count": 34057,
      "created_at": "Tue Dec 10 13:05:42 +0000 2013",
      "utc_offset": 7200,
      "time_zone": "Berlin",
      "geo_enabled": true,
      "lang": "en",
      "contributors_enabled": false,
      "is_translator": false,
    }

【问题讨论】:

    标签: javascript json node.js mongodb


    【解决方案1】:

    我建议你在谷歌上搜索 mean.js 和 mean.io,它们都为基于 Mongo 和 Node(使用 Express 和 Angular,因此是 MEAN)的应用程序提供了一个很好的起点,并且还有一些额外的好处.

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-06-22
      • 1970-01-01
      • 2012-10-21
      • 1970-01-01
      • 2016-03-10
      相关资源
      最近更新 更多