Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const arr = [
- {
- ems_id: "",
- moc: "MRNC",
- metadata: "",
- isSSH: 0,
- gsmRanShareSwitch: "",
- ommPort: "21125",
- ems4xId: "",
- summerTimeoffset_1min: "60",
- timeZoneoffset: 38,
- nbiId: "201",
- mcc: "510",
- protocol: "tcp,emb",
- administrativeState: 0,
- radioMode: "",
- omm_id: "",
- summTimeStart: "0-0 0:0",
- networkingMode: "",
- id: "cbab3f92-1dd3-465f-976e-27dd1818ec4b",
- longitude: "0.0",
- nbiotRanShareSwitch: "",
- sshPort: "0",
- mimVersion: "BSCV4_V12.18.41P02",
- summerTimeoffset: "4",
- ommFtpPasswd: "22D1DC944113D348D884D6278CA371AD",
- ommFtpPort: "21",
- connectionState: 1,
- ipAddress: "129.0.1.1",
- plmn: "510-10",
- priority: "2",
- vendorName: "ZTE",
- version: "V4.17.10",
- productInfo: "GSM",
- lteRanShareSwitch: "",
- port: "",
- ommSecretKeyId: "KEY_AES256_UEP_20110623",
- ltetddRanShareSwitch: "",
- name: "BSCZ_SML(201)(201)",
- subType: "GSM",
- maintainStatus: "0",
- operationalState: 1,
- ommConnectionState: 1,
- ommIpAddress: "10.251.169.67",
- summerTimeoffsetType: 0,
- originalType: "",
- timezone: "",
- displayName: "BSCZ_SML(201)(201)",
- latitude: "0.0",
- description: "SML-TEOCO-BSC-A",
- oid: "urop:OMMOID=603d8e89-PA@sbn=201@me=201",
- ltefddRanShareSwitch: "",
- configProductInfo: "GSM",
- userdefinedState: "0",
- cmDataFreeze: "",
- summTimeEnd: "0-0 0:0",
- isSuppSummTime: 0,
- managedFunctionInfo: "BSC",
- swInfo: "V4.17.10",
- umtsRanShareSwitch: "",
- timeZoneoffset_15min: "GMT+07:00",
- mnc: "10",
- ommFtpUser: "uep",
- ranShareSwitch: 0,
- maintainState: "0",
- nrRanShareSwitch: "",
- ommFtpType: "ftp",
- location: "",
- subnetwork_nbiId: "201",
- },
- ]
- let obj = arr[0];
- let newObj = []
- const keys = Object.keys(obj);
- const vals = Object.values(obj);
- const entries = Object.entries(obj);
- console.log(keys)
- console.log(vals)
- console.log(entries)
- entries.forEach((e, i) => {
- e = {caption: e[0],param: e[0], value: e[1] };
- newObj.push(e);
- });
- console.log(obj)
- console.log(newObj)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement