I have a unique code snippet containing a JSON database
and an XMLHttpRequest object
.
The user
parameter in the function getUsers(user)
is user input. I am trying to select a user from the database based on the search input value, but I'm unsure about setting the correct HTTP URL
or creating a suitable search algorithm
.
Currently, I can select a user using user.Name1
, but I'm struggling with modifying it after the dot (.Name1
) so that it matches the input value.
For example: user. + "input value"
. I'm having difficulty figuring this out.