2
var data1 = {
    "SummaryFields": [
        {
            "FieldName": "UserName",
            "FieldCode": "UDF_F_935",
            "Visable": true
        },
        {
            "FieldName": "DateNow",
            "FieldCode": "UDF_F_936",
            "Visable": true
        },
        {
            "FieldName": "ReportID",
            "FieldCode": "ReportID",
            "Visable": false
        }
    ],
    "Code": 0,
    "Message": null
};

var data2 = {
    "TotalCount": 2,
    "ReturnData": [
        {
            "UDF_F_935": "SuperMan",
            "UDF_F_936": "2009-05-01",
            "UDF_F_938": "admin",
            "ReportID": "221"
        },
        {
            "UDF_F_935": "SuperMan",
            "UDF_F_936": "2009-05-01",
            "UDF_F_938": "admin",
            "ReportID": "220"
        }
    ],
    "Code": 0,
    "Message": null
};

I can get data1 from api one and then get data2 from api tow.

I don't know what data will be display, the server will change the data at any time.

The display style will change if the data change

Now,I want to show the list on the phone like

UserName:SuperMan,
DateNow:2009-05-01,
ReportID:221

UserName:SuperMan,
DateNow:2009-05-01,
ReportID:220

How can I use data1 and data2 to structure json data by javascript?

Need to consideration phone performance.

Thanks for your help!

AZmake
  • 33
  • 6
  • 1
    You have all data in `data2` why do you need `data1`? – Keyur Shah Nov 15 '16 at 07:45
  • but but but ... `data1` specifies that `FieldName:ReportID` should be `visable:false` - if you try to make it visable, who knows what could happen!!! ... and DateNow is 2009!! you've been sitting on this question for a while now – Jaromanda X Nov 15 '16 at 07:51
  • No, the two data form different api,and I don't know what data will be display, the server will change the data any time – AZmake Nov 15 '16 at 07:54
  • @Jaco I don't want to do that,but the API server will do that, the server will change data at any time – AZmake Nov 15 '16 at 07:58
  • @JaromandaX Just make it easy! – AZmake Nov 15 '16 at 08:11

0 Answers0