1

こんにちは、私はコレクション名 test_data を持っています。このコレクションには、指定された形式のようなデータがあります

Data =  [{
    "_id" : "53fe7ae0ef038fee879263d5",
    "chanal_id" : "can1",
    "instrumentnam" : "New Demo Device",
    "siteid" : "53fe741d66455060e003c2d8",
    "locationid" : "53fe74a866455060e003c2db",
    "timestamp" : 1406916000,
    "status" : "online",
    "msgtype" : "demographics",
    "fps" : "5",
    "people" : [ 
        {
            "id" : 1,
            "age" : 23,
            "gender" : "male",
            "ethnicity" : null,
            "mood" : "happy",
            "ethnicity_mod" : "White",
            "mood_mod" : "Happy",
            "gender_mod" : "Female",
            "age_mod" : 22
        }
    ],
    "dateUTC" : 1409190000
},


{
    "_id" : "53fe7ae0ef038fee879263d6",
    "chanel_id" : "can1",
    "instrumentnam" : "New Demo Device",
    "siteid" : "53fe741d66455060e003c2d8",
    "locationid" : "53fe74a866455060e003c2db",
    "timestamp" : 1406917800,
    "status" : "online",
    "msgtype" : "demographics",
    "fps" : "5",
    "people" : [ 
        {
            "id" : 2,
            "age" : 16,
            "gender" : "female",
            "ethnicity" : null,
            "mood" : "happy",
            "ethnicity_mod" : "White",
            "mood_mod" : "Happy"
        }
    ],
    "dateUTC" : 1409186528
},

{
    "_id" : "53fe7ae0ef038fee879263d7",
    "chanal_id" : "can1",
    "instrumentnam" : "New Demo Device",
    "siteid" : "53fe741d66455060e003c2d8",
    "locationid" : "53fe74a866455060e003c2db",
    "timestamp" : 1406918800,
    "status" : "online",
    "msgtype" : "demographics",
    "fps" : "5",
    "people" : [ 
        {
            "id" : 3,
            "age" : 33,
            "gender" : "male",
            "ethnicity" : null,
            "mood" : "happy",
            "ethnicity_mod" : "White"
        }
    ],
    "dateUTC" : 1409186528
}
,

{
    "_id" : "53fe7ae0ef038fee879263d8",
    "chanal_id" : "can1",
    "instrumentnam" : "New Demo Device",
    "siteid" : "53fe741d66455060e003c2d8",
    "locationid" : "53fe74a866455060e003c2db",
    "timestamp" : 1406919800,
    "status" : "online",
    "msgtype" : "demographics",
    "fps" : "5",
    "people" : [ 
        {
            "id" : 4,
            "age" : 45,
            "gender" : "female",
            "ethnicity" : null,
            "mood" : "happy",
            "age_mod" : 5
        }
    ],
    "dateUTC" : 1409186528
},


{
    "_id" : "53fe7ae0ef038fee879263d9",
    "chanal_id" : "can1",
    "instrumentnam" : "New Demo Device",
    "siteid" : "53fe741d66455060e003c2d8",
    "locationid" : "53fe74a866455060e003c2db",
    "timestamp" : 1406920800,
    "status" : "online",
    "msgtype" : "demographics",
    "fps" : "5",
    "people" : [ 
        {
            "id" : 5,
            "age" : 14,
            "gender" : "female",
            "ethnicity" : null,
            "mood" : "angry"
        }
    ],
    "dateUTC" : 1409186528
},


{
    "_id" :"53ff927266455060e003c2e0",
    "chanal_id" : "rtsp://192.168.1.83:554/live.sdp",
    "instrumentnam" : "Test Device",
    "siteid" : "53f62abf66455068373665ff",
    "locationid" : "53f62bb86645506837366603",
    "timestamp" : 1409258116,
    "status" : "online",
    "msgtype" : "demographics",
    "fps" : "32",
    "people" : [],
    "dateUTC" : 1409258098
}]

これはjson形式です。私がやろうとしていること1.Linuxシステムでタイムスタンプをエポック時間からUTC時間に変換したい。および 2. Linux システムで mongodb コードを使用して、この json データを csv 形式に変換したいと考えています。

誰でも私がこれを行うのを手伝ってくれますか。

4

0 に答える 0