JSON2 edit json in bash install jq https://stedolan.github.io/jq/manual/ sudo apt-get install jq 사용방법 jsonStr='{ "key1": "value1", "key2": "value2", "key3": "value3" }' jq 'del(.key3)' 2020. 5. 31. json 배열 합치기(merge) 및 소팅하기 var by = function (name) { return function (o, p) { var a, b; if (typeof o === 'object' && typeof p === 'object' && o && p) { a = o[name]; b = p[name]; if (a === b) { return 0; } if (typeof a === typeof b) { return a > b ? -1 : 1; } return typeof a > typeof b ? -1 : 1; } else { throw { name: 'Error', message: 'Expected an object when sorting by ' + name }; } }; };alerts2 = [{ "id": "test", "comm.. 2016. 1. 13. 이전 1 다음