0

I have one array like "house". Each house object has multiple parameters like id, name, images, address. And i am showing all these in table view. Now i have one parameter key name.

I have to loop in to my house array , and find out the name which is contain in my array and i have to find out the Index.

So that in my table view i need to scroll that particular house item to top.

Any solution how can i achieve that.

Eg: Array - > [[id, name, image,address], [id, name, image,address], [id, name, image,address], [id, name, image,address]]

I have one key : "name".

I have to loop in to my array and get the index, so that i can scroll to that particular index.

Thanks

1 Answer 1

1

You can use the functions firstIndexOf and lastIndexOf functions available in swift. You can find details on How to find index of list item in Swift?

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

Comments

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.