This is really not a foxweb issue, but need someone to help or suggest a solution.
E.g. (Sample Foxweb Script):
SELECT * FROM SON5200 INTO CURSOR crScharge ORDER BY Servcode
IF _TALLY > 0
SchargeJSON = fwJSON.WriteCursor()