Request For Explanation .... How To
So, I ran across this module, just last night and I think it will be helpful .... I just need a little "show and tell." Below you can see my function "GetBearerToken" which takes a parameter {bearer_token:token}.. no issues there...my problem is ...the variable "ss" I want to use it outside of this function...pass it to another function to do something then....of course when I try and access the "ss" the variable is undefined. I posted this question on stackoverflow...but it was considered a duplicate. So any help would be great...Thanks
GetBearerToken ({bearer_token:token},function (error, result) {
if (error) throw error;
if (result)
{
var resultset
var i;
for (i=0; i< result.length; i++)
{
resultset = (simpleObjectify(result[i].meta, result[i].rows))
}
var jstring = JSON.stringify(resultset);
var obj = JSON.parse(jstring);
var ss = obj[0].uuid;
console.log(ss)
})
outside of function ss = undefined
This is not related to this module. Place the variable definition ss outside of the function scope