Well I couldn't resists trying to fix this set of UDF's so think I am getting close with the attached version:
#include <array.au3>
#include <json.au3>
$json1 = '{"Global Quote":{"01. symbol" : "MSFT","02. open" : "01.10","03 high" : "10.1"}}'
$json1bis = '{"GlobalQuote":{"01. symbol" : "MSFT","02. open" : "02.10","03 high" : "20.2"}}'
$json1tris = '{"GlobalQuote":{"01. symbol" : "MSFT","02.open" : "03.10","03high" : "30.3"}}'
$Json = Json_Decode($json1)
$Jsonbis = Json_Decode($json1bis)
$Jsontris = Json_Decode($json1tris)
;
ConsoleWrite("!===============================================================================" & @crlf)
ConsoleWrite("CASE 1 -->> " & Json_Get($Json, '."Global Quote"."03 high"') & @LF) ; ==>> it works!!
ConsoleWrite("CASE 2 -->> " & Json_Get($Json, '.Global Quote."03 high"') & @LF) ; ==>> it doesn't work!!
ConsoleWrite("CASE 2bis -->> " & Json_Get($Jsonbis, '.GlobalQuote."03 high"') & @LF) ; ==>> it works!!
ConsoleWrite("CASE 2bis2-->> " & Json_Get($Jsonbis, 'GlobalQuote."03 high"') & @LF) ; ==>> it doesn't work!!
ConsoleWrite("CASE 2bis3-->> " & Json_Get($Jsonbis, 'GlobalQuote.03 high') & @LF) ; ==>> it doesn't work!!
;~ ;
ConsoleWrite("CASE 3 -->> " & Json_Get($Json, '[Global Quote][03 high]') & @LF) ; ==>> it doesn't work!!
ConsoleWrite("CASE 3bis -->> " & Json_Get($Jsonbis, '[GlobalQuote][03 high]') & @LF) ; ==>> it doesn't work!!
ConsoleWrite("CASE 3tris-->> " & Json_Get($Jsontris, '[GlobalQuote][03high]') & @LF) ; ==>> it doesn't work!!
;~ ;
ConsoleWrite("CASE 4 -->> " & Json_Get($Json, '[Global Quote]["03 high"]') & @LF) ; ==>> it doesn't work!!
ConsoleWrite("CASE 4bis -->> " & Json_Get($Jsonbis, '[GlobalQuote]["03 high"]') & @LF) ; ==>> it works!!;~ ;
;
ConsoleWrite("CASE 1 -->> " & Json_Get($Json, '."Global Quote"."03 high"') & @LF) ; ==>> it works!!
ConsoleWrite("CASE 1 -->> " & Json_Get($Json, '."Global Quote"."02. open"') & @LF) ; ==>> it works!!
ConsoleWrite("CASE 2 -->> " & Json_Get($Json, '.Global Quote."02. open"') & @LF) ; ==>> it doesn't work!!
ConsoleWrite("CASE 2bis -->> " & Json_Get($Jsonbis, '.GlobalQuote."02. open"') & @LF) ; ==>> it works!!
ConsoleWrite("CASE 2bis2-->> " & Json_Get($Jsonbis, 'GlobalQuote."02. open"') & @LF) ; ==>> it doesn't work!!
;~ ;
ConsoleWrite("CASE 3 -->> " & Json_Get($Json, '[Global Quote][02. open]') & @LF) ; ==>> it doesn't work!!
ConsoleWrite("CASE 3bis -->> " & Json_Get($Jsonbis, '[GlobalQuote][02. open]') & @LF) ; ==>> it doesn't work!!
ConsoleWrite("CASE 3tris-->> " & Json_Get($Jsontris, '[GlobalQuote][02.open]') & @LF) ; ==>> it doesn't work!!
;~ ;
ConsoleWrite("CASE 4 -->> " & Json_Get($Json, '[Global Quote]["02. open"]') & @LF) ; ==>> it doesn't work!!
ConsoleWrite("CASE 4bis -->> " & Json_Get($Jsonbis, '[GlobalQuote]["02. open"]') & @LF) ; ==>> it works!!;~ ;
Results:
!===============================================================================
CASE 1 -->> 10.1
CASE 2 -->> 10.1
CASE 2bis -->> 20.2
CASE 2bis2-->> 20.2
CASE 2bis3-->> 20.2
CASE 3 -->> 10.1
CASE 3bis -->> 20.2
CASE 3tris-->> 30.3
CASE 4 -->> 10.1
CASE 4bis -->> 20.2
CASE 1 -->> 10.1
CASE 1 -->> 01.10
CASE 2 -->> 01.10
CASE 2bis -->> 02.10
CASE 2bis2-->> 02.10
CASE 3 -->> 01.10
CASE 3bis -->> 02.10
CASE 3tris-->> 03.10
CASE 4 -->> 01.10
CASE 4bis -->> 02.10
@aio and others, could you have a spin with this version to see whether anything is broken?
Jos
Json.au3