I’m new to develop app using jquery, react, bootstrap
below my code :
button() {
var api = "https://localhost/api/api.php/users_login?filter=username,eq,admin";
var settings = {
async: true,
crossDomain: true,
url: api,
method: "GET",
}
jquery.ajax(settings).done(function (response) {
var array = jquery.map(response, function (value,index) {
return value;
});
});
}
and the output json from api from localhost
{"users_login":{"columns":["id","username","password"],"records":[[2,"admin","admin"]]}}
I find it difficult to get value of username
and password
.
I’m already trying to search on google about my problem and use any advice which I found, but still can’t find the best answer. what i want is
var uname = value of username...;
var pass = value of password...;
and I need advice
- whether it is good to build front-end web using react+bootstrap for
develop cms blogging ? (back-end using laravel) - what the best source as dependency for dynamic url pagination like wordpress so can SEO friendly ?
please help me to resolve the problem and give me advice.
thank you very much.
2
Answers
this the answer which I'm applied refer from mayank shukla
thank you very much.
JSON that you pasted contains the username and password in
users_login
key, and records is itself an array, so you need to use it like this: