packedjson icon indicating copy to clipboard operation
packedjson copied to clipboard

`{}=` proc result is inconsistent with stdlib.json

Open lbcheng888 opened this issue 6 years ago • 0 comments

import packedjson
var cost = newJObject()
var rows = [["AWS","compute"],["AWS","network"],["Alibaba","compute"],["Alibaba","network"]]

for row in rows:
    cost{row[0],row[1]} = %(cost{row[0],row[1]}.getFloat + 1.0)
echo cost

change packedjson to json to see the expected result.

lbcheng888 avatar May 15 '19 03:05 lbcheng888