2015-04-13 4 views
-1

У меня есть сохраненные данные различных твитов в MongoDB и i m, отображаемые в формате JSON, как показано ниже. Я просто хочу получить имя местоположения из этих объемных данных и отобразить его на другой странице с помощью node.js.Получение определенных данных 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, 
    } 

ответ

0

Я предлагаю вам поиск Google для mean.js и mean.io, оба дают очень хорошую отправную точку для приложений, основанных на на Mongo и Node (с Express и Angular, следовательно MEAN), с несколькими дополнительными преимуществами в пути.

Смежные вопросы