Hi Gayan, AFAIK "lenghtof" was introduced from Ballerina 0.9
Anyway you can try this, int lengthOfTheArray = jsons:getInt ( jsonArray , "$.length()"); where you only have to include the folloeing import, import ballerina.lang.jsons; It worked for me. Regards. On Wed, Oct 25, 2017 at 11:42 AM, Gayan Chamara <[email protected]> wrote: > Hi, > Is lengthof operator available in ballerina 0.89? I tried it but it gives > an error ( invalid identifier 'lengthof'). if not, how can I check the > length of an json array? > > Thanks, > Gayan. > > -- > Regards, > > *Gayan Chamara* > > *Software Engineering Intern* > *WSO2 Inc.* > > > *Email: [email protected] <[email protected]> * > *Mobile : **+94 71 728 5827 <+94%2071%20728%205827>* > <http://wso2.com/signature> > -- *Sabeena Kumarawadu* | Software Engineering Intern WSO2 Lanka (Pvt) Ltd. #20, Palm Grove, Colombo 03, Sri Lanka Mobile: +94 71 0372856 Email: [email protected] [image: http://wso2.com/signature] <http://wso2.com/signature>
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
