AI Zone Admin Forum Add your forum

NEWS: survey on 3000 US and UK consumers shows it is time for chatbot integration in customer service!read more..

Jo-t1001 question

hi! Im a beginner in cs
I want to link the weather api.
Im trying to connect Seoul weather from
The result value of api is

“weather”:[{"id":803,"main":"Clouds","description":"broken clouds","icon":"04d"}],

I just want to use what i want to use here.

This is my file
concept: ~날씨 NOUN [ 오늘 날씨 한국날씨 오늘날씨 ]
concept: ~지역 NOUN [ 서울시 성남시 수원시 용인시 울산광역시 인천광역시 seoul gangdong-gu ]

Topic: ~WEATHER keep repeat ( ~날씨 ~지역 )

u: ( ~날씨 ) 지역을 먼저 말해주세요.
u: ( _~지역 ) $location = ‘_0 ^keep() repeat()
$_var = ^jsoncreate(transient object)
$_var.fieldname = $myvar
$_var = ^jsonparse(^”{ fieldname: $myvar }”)
$_url = ^“$location,KR&APPID=5b5548dbbdde086446b1d0f2601c2571”
$_userAgent = ^“User-Agent: %bot, ChatScript”
^jsonopen( post $_url “” $_userAgent )


but result is Jo-t1001
Is the result of api long? ㅠ_ㅠ?
Thanks for the answer!


  [ # 1 ]

That is the name reference for a json object. You can retrieve data from it, eg by dot selection.

$_obj = ^jsonopen…

$_object.coord is a piece or $_object.coord.lon drills down depper.


  [ # 2 ]

Thanks! The answer was very helpul:-)


  login or register to react