Basically I'm creating an options page in which the user will click on a button to display a text input field, which will then be populated by the user with a name.
This name will be then saved into the db using ajax (all that's working already). The user will be able to as many names she/he wants.
At the moment, as a feedback to the user, I'm adding a list with the names that were previously saved with jQuery, however I'd like to load the options from the db to check whether the info collected by jQuery is correct.
I've been doing some research and it seems the way to do it is to use
wp_localize_script which I'm finding it cumbersome to load dynamically created data.
wp_localize_script the correct way to do it or should I just make an ajax call as you'd normally do?