How can I convert object to array
Public async list
{
// here I need to convert obj to array
}
And need to count array count
How can I convert object to array
Public async list
{
// here I need to convert obj to array
}
And need to count array count
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Amit MohantyPosted Aug 8, 2023, 5:38 AM
Cr BhargaviPosted Aug 8, 2023, 5:29 AM
Please use the code below which will calculate the count aswell as it will convert obj into array
Tahir AnsariPosted Aug 8, 2023, 4:30 AM
siva nathanPosted Aug 8, 2023, 1:16 AM
Hi imran,
Request object as like below
[{
"Name": " siva",
"Dob":" 05-09-2000"
}]
How can I get the count of array from above object
Muhammad Imran AnsariPosted Aug 7, 2023, 8:19 PM
To achieve this, first determine the type of the object and then convert it accordingly. Since the method signature you provided is for a list of strings, Here's how you can do it: