Closed 1kko closed 12 years ago
It's a great bash script. I was parsing some sort of data like this:
test.json
{ "test_1": { "origin" : { "name" : "test2" }, "test_2": { "origin": { "name": "test2" } }
now i'm importing test.json from my bash script.
DATA=`cat ./test.json` tickParse "$DATA" echo ``test_1[origin[name]]``
but i only get blank.
so I was looking at the issue lists, i found way to debug, using __tick_var_debug=1 after then, I'm looking following output
#!/bin/bash __tick_var_debug=1 . ticktick.sh DATA=`cat ./test.json` tickParse "$DATA" echo ${__tick_data_test_000000000001_origin_name}
Now It seems like tickParse is rewriting numbers in my classes. last line should be ${__tick_data_test_1_origin_name} not ${__tick_data_test_000000000001_origin_name}
${__tick_data_test_1_origin_name}
${__tick_data_test_000000000001_origin_name}
I totally see the problem, it's the use of the underscores ... drats ... let me think about this one.
try giving this one a go. thanks.
Sorry for late reply. It fixed perfectly! Thanks!
It's a great bash script. I was parsing some sort of data like this:
test.json
now i'm importing test.json from my bash script.
but i only get blank.
so I was looking at the issue lists, i found way to debug, using __tick_var_debug=1 after then, I'm looking following output
Now It seems like tickParse is rewriting numbers in my classes. last line should be
${__tick_data_test_1_origin_name}
not${__tick_data_test_000000000001_origin_name}