How to use JSON Form array currentItem

Hi, I have a question now. There is an array named searchArray in the JSON Form. Each element in the array is an object with an id and a name attribute. id is of select type. When the user enters the id, the api is requested and the query result is returned. When an option is selected, you want to be able to automatically echo the name of the selected option to the corresponding name input box. However, now I cannot obtain which element of array is operated on, so I do not know how to request api and display the information in response in the corresponding options after obtaining the result, nor do I know how to display it in the corresponding name after selecting option

Refer:[Feature]-[72]:Add currentItem and currentItem.id in JSON Form Arrays · Issue #16343 · appsmithorg/appsmith · GitHub

I want to use currentItem to manipulate the selected element in the current array, but when I declare currentItem it shows undefined

Hi @kevin1,
I would like you to clarify something for me: When the Id is selected, the intended behavior is that the value is used In an API request and at the same time, displayed in the name field, right?

YES.Yes, I use the id to request api to get name.And then, display response name in the name field.But this is array, I cant make sure which is the element currently being manipulated.

@Olawale Can you help me with this question.Thx!

Hey @kevin1!

Jimmy from Appsmith support here. :wave:

We don’t currently have a way to access the current item or index of arrays in a JSON Form.

You can track the issue you found previously for updates. Please leave a comment with your use case there to help us prioritize the issue.

Thank you!

@Laguna May I ask if there are any other ways to solve my current problem?Thx