Date:  08/01/2018 08:46:16 PM Msg ID:  004958
From:  Jeff Grippe Thread:  004957
Subject:  Re: Access foxweb\'s JSON sting in Javascript
Hello,
 
I think you need to use Response.Write(fwJSON.WriteCursor()) so that the FWX will return json instead of a page. Then all you have to do is to write an ajax/ http request.
 
 
users={}
$http.get('\getusers.fwx').then(function(resp){
users =resp.data;
});
 
Sent by Olatunji Beckley on 07/27/2018 04:02:09 PM:
Hi All,
 
This is really not a foxweb issue, but need someone to help or suggest a solution.
 
I would like to access a json string generated with fwJSON.WriteCursor() as a JSON object in javascript function.  
 
E.g. (Sample Foxweb  Script):
 
SELECT * FROM SON5200 INTO CURSOR crScharge ORDER BY Servcode
IF _TALLY > 0
    SchargeJSON = fwJSON.WriteCursor()
ENDIF
 
Is there a way to reference the SchargeJSON variable/object in a javascript function?
 
TIA