calling an api from a stack?

Eric A. Engle engleerica at yahoo.com
Fri Jun 15 13:03:08 EDT 2018


This works, sort of:

  put URL "https://translate.yandex.net/api/v1.5/tr.json/translate?key=trnsl.1.1.20180527T091305Z.7f33f9fb3f66f0bb.d573f1d9a6336a981504916600c45f49255938b3&text=hello%20world&lang=en-de" into tResult
  put tResult into card field 1
  --put JsonImport(tResult) into  tResults
  --put JsonToArray(tResults) into tProfile
  put tResult & return into cd fld 1
  set the itemdelimiter to "["
  put the last item of tResult after cd fld 1

for some reason JsonImport and JsonToArray return nothing. I can however set delimiter to [ and then programmatically delete the first and last 3 chars after the last item of tResult. But why can't, or how, must I extract from Json?




More information about the Use-livecode mailing list