249
Views
2
Comments
Solved
Passing list as input of javascripts

Hello, Everyone

Good morning

I am passing the record list as input of the javascript parameter but as you all know javascript wiget don't accept list data type if want to give a list then we will have to convert it into object by using ToObject(List) method now if the list comes as an object in javascript then I want to use list data (which is an object) inside javascript 

How can I access data? or can convert that object into as JSON so that we can use JSON in our javascript


Let me know if you want more about my Q


Regards

Vish Holge


2020-11-25 10-45-32
Mostafa Othman
Champion
Solution

Hello Vish,

You can pass your list as JSON string to JavaScript using JSONSerialize widget then you can convert JSON to object inside your JavaScript function and use it.

2022-08-03 04-32-50
Ravi Punjwani

Hi Vish,

List variable > Json string > pass into JavaScript as string > parse json and convert into array inside JavaScript > access elements in array.

This is easiest and popular way for accessing list in JavaScript.



2020-11-25 10-45-32
Mostafa Othman
Champion
Solution

Hello Vish,

You can pass your list as JSON string to JavaScript using JSONSerialize widget then you can convert JSON to object inside your JavaScript function and use it.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.