我有以下JSON。我需要交换SortId
就像我有这个,
[{"CategoryId":1,"Name":"Worktable","SortId":1}
,{"CategoryId":2,"Name":"Bf ","SortId":2}]
交换'SortId'之后我需要
[{"CategoryId":1,"Name":"Worktable","SortId":2}
,{"CategoryId":2,"Name":"Bf ","SortId":1}]
请告诉我如何通过JavaScript来实现。