
2 answers
Hello Vetriselvan,You can use JSON Class Methods of Apex:Please try following Code: public String getUserNames(){
List<Stribng> lstuserName = new List<String>(){ 'first', 'second', 'third', 'fourth', 'fifth', 'sixth', 'seventh', 'eighth', 'ninth', 'tenth' };
return JSON.serialize(lstuserName);
}
If its helps, please mark as best answer so it will help to other who will serve same problem.
Thanks!