with is the supposed way to do this, could'nt find
any documentation, so we tried this:

#!/bin/sh
. /usr/share/libubox/jshn.sh

JSON="$( wget -qO - "$URL" )"
eval $( jshn -r "$JSON" )

echo "Status is $JSON_VAR_status"
echo "Number is: $JSON_TABLE1_number"


####
Or is this too naiv?
This is the JSON which gets parsed:

{
  "status": 200,
  "msg": "ok",
  "result": {
    "number": "99",
    "mac": "d85d4c9c2f1a",
    "last_seen": 1363777473407
  }
}

_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to