0

Would you please let me know how can I fill listview with this object array in Xamarin form.

{
    "products": [
        {
            "CODE": "B25-4126"
        },
        {
            "CODE": "F1-2228"
        }
}

Thanks

1 Answer 1

2

First create Model for JSON result as follows:

public class Product
{
public string CODE { get; set; }
}

public class ProductList
{
public List<Product> products { get; set; }
}

Now deserialize json to model ProductList and assign it ItemSource property of listview

Sign up to request clarification or add additional context in comments.

1 Comment

Welcome fattaneh :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.