Angular : How to convert values in array and get value in outside scope?












2















Here InDynamicDatabase class I fetch value from server and got In console.log(this.rootLevelNodes) // folder-1 folder-2 folder-3 folder-4 see In below code but I want this value in array. and then outside this.route I print console.log(this.rootLevelNodes) // there I got null (this.rootLevelNodes) in function but I dont know why I got null result but there where also I want In array format result how it is possible see my below code and help me ?



@Injectable()
export class DynamicDatabase {

rootLevelNodes: string = ;
constructor(private route : ActivatedRoute, private userService : UserService){}
upperFolderId;
urlOfFolder;

initialData(): DynamicFlatNode {

this.route.params.subscribe(params => {

this.upperFolderId = params['userid'];
this.urlOfFolder = params['url']+'/'+this.upperFolderId;

this.userService.getPatternMainFolder({'urlOfFolder' : this.urlOfFolder}).subscribe(
(data) => {
if(data != undefined && data != '' && data.payload != undefined && data.payload != ''){
for(var i = 0 ; i < data.payload.length ; i++){
this.rootLevelNodes = data.payload[i].folderName;
console.log(this.rootLevelNodes); // folder-1
folder-2
folder-3
folder-4
<-- this type result I got

// I want this type result
console.log(this.rootLevelNodes); // ['folder-1','folder-2','folder-3','folder-4']
}
}
}
)
});

console.log(this.rootLevelNodes); // --> Here I result got null array

// Here also I want this type result want
console.log(this.rootLevelNodes); // ['folder-1','folder-2','folder-3','folder-4']
return this.rootLevelNodes.map(name => new DynamicFlatNode(name, 0, true));
}









share|improve this question























  • that is async call!

    – Prashant Pimpale
    Jan 2 at 12:16











  • @PrashantPimpale I print console so outside console is first print but How to resolve this

    – DDD
    Jan 2 at 12:17











  • What do you want to do with that variable? Wanna use in HTML or call api?

    – Prashant Pimpale
    Jan 2 at 12:18











  • @PrashantPimpale I want to use in HTML

    – DDD
    Jan 2 at 12:18











  • Just like this? --> {{rootLevelNodes | json }}

    – Prashant Pimpale
    Jan 2 at 12:20


















2















Here InDynamicDatabase class I fetch value from server and got In console.log(this.rootLevelNodes) // folder-1 folder-2 folder-3 folder-4 see In below code but I want this value in array. and then outside this.route I print console.log(this.rootLevelNodes) // there I got null (this.rootLevelNodes) in function but I dont know why I got null result but there where also I want In array format result how it is possible see my below code and help me ?



@Injectable()
export class DynamicDatabase {

rootLevelNodes: string = ;
constructor(private route : ActivatedRoute, private userService : UserService){}
upperFolderId;
urlOfFolder;

initialData(): DynamicFlatNode {

this.route.params.subscribe(params => {

this.upperFolderId = params['userid'];
this.urlOfFolder = params['url']+'/'+this.upperFolderId;

this.userService.getPatternMainFolder({'urlOfFolder' : this.urlOfFolder}).subscribe(
(data) => {
if(data != undefined && data != '' && data.payload != undefined && data.payload != ''){
for(var i = 0 ; i < data.payload.length ; i++){
this.rootLevelNodes = data.payload[i].folderName;
console.log(this.rootLevelNodes); // folder-1
folder-2
folder-3
folder-4
<-- this type result I got

// I want this type result
console.log(this.rootLevelNodes); // ['folder-1','folder-2','folder-3','folder-4']
}
}
}
)
});

console.log(this.rootLevelNodes); // --> Here I result got null array

// Here also I want this type result want
console.log(this.rootLevelNodes); // ['folder-1','folder-2','folder-3','folder-4']
return this.rootLevelNodes.map(name => new DynamicFlatNode(name, 0, true));
}









share|improve this question























  • that is async call!

    – Prashant Pimpale
    Jan 2 at 12:16











  • @PrashantPimpale I print console so outside console is first print but How to resolve this

    – DDD
    Jan 2 at 12:17











  • What do you want to do with that variable? Wanna use in HTML or call api?

    – Prashant Pimpale
    Jan 2 at 12:18











  • @PrashantPimpale I want to use in HTML

    – DDD
    Jan 2 at 12:18











  • Just like this? --> {{rootLevelNodes | json }}

    – Prashant Pimpale
    Jan 2 at 12:20
















2












2








2








Here InDynamicDatabase class I fetch value from server and got In console.log(this.rootLevelNodes) // folder-1 folder-2 folder-3 folder-4 see In below code but I want this value in array. and then outside this.route I print console.log(this.rootLevelNodes) // there I got null (this.rootLevelNodes) in function but I dont know why I got null result but there where also I want In array format result how it is possible see my below code and help me ?



@Injectable()
export class DynamicDatabase {

rootLevelNodes: string = ;
constructor(private route : ActivatedRoute, private userService : UserService){}
upperFolderId;
urlOfFolder;

initialData(): DynamicFlatNode {

this.route.params.subscribe(params => {

this.upperFolderId = params['userid'];
this.urlOfFolder = params['url']+'/'+this.upperFolderId;

this.userService.getPatternMainFolder({'urlOfFolder' : this.urlOfFolder}).subscribe(
(data) => {
if(data != undefined && data != '' && data.payload != undefined && data.payload != ''){
for(var i = 0 ; i < data.payload.length ; i++){
this.rootLevelNodes = data.payload[i].folderName;
console.log(this.rootLevelNodes); // folder-1
folder-2
folder-3
folder-4
<-- this type result I got

// I want this type result
console.log(this.rootLevelNodes); // ['folder-1','folder-2','folder-3','folder-4']
}
}
}
)
});

console.log(this.rootLevelNodes); // --> Here I result got null array

// Here also I want this type result want
console.log(this.rootLevelNodes); // ['folder-1','folder-2','folder-3','folder-4']
return this.rootLevelNodes.map(name => new DynamicFlatNode(name, 0, true));
}









share|improve this question














Here InDynamicDatabase class I fetch value from server and got In console.log(this.rootLevelNodes) // folder-1 folder-2 folder-3 folder-4 see In below code but I want this value in array. and then outside this.route I print console.log(this.rootLevelNodes) // there I got null (this.rootLevelNodes) in function but I dont know why I got null result but there where also I want In array format result how it is possible see my below code and help me ?



@Injectable()
export class DynamicDatabase {

rootLevelNodes: string = ;
constructor(private route : ActivatedRoute, private userService : UserService){}
upperFolderId;
urlOfFolder;

initialData(): DynamicFlatNode {

this.route.params.subscribe(params => {

this.upperFolderId = params['userid'];
this.urlOfFolder = params['url']+'/'+this.upperFolderId;

this.userService.getPatternMainFolder({'urlOfFolder' : this.urlOfFolder}).subscribe(
(data) => {
if(data != undefined && data != '' && data.payload != undefined && data.payload != ''){
for(var i = 0 ; i < data.payload.length ; i++){
this.rootLevelNodes = data.payload[i].folderName;
console.log(this.rootLevelNodes); // folder-1
folder-2
folder-3
folder-4
<-- this type result I got

// I want this type result
console.log(this.rootLevelNodes); // ['folder-1','folder-2','folder-3','folder-4']
}
}
}
)
});

console.log(this.rootLevelNodes); // --> Here I result got null array

// Here also I want this type result want
console.log(this.rootLevelNodes); // ['folder-1','folder-2','folder-3','folder-4']
return this.rootLevelNodes.map(name => new DynamicFlatNode(name, 0, true));
}






javascript arrays angular






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Jan 2 at 12:14









DDDDDD

385218




385218













  • that is async call!

    – Prashant Pimpale
    Jan 2 at 12:16











  • @PrashantPimpale I print console so outside console is first print but How to resolve this

    – DDD
    Jan 2 at 12:17











  • What do you want to do with that variable? Wanna use in HTML or call api?

    – Prashant Pimpale
    Jan 2 at 12:18











  • @PrashantPimpale I want to use in HTML

    – DDD
    Jan 2 at 12:18











  • Just like this? --> {{rootLevelNodes | json }}

    – Prashant Pimpale
    Jan 2 at 12:20





















  • that is async call!

    – Prashant Pimpale
    Jan 2 at 12:16











  • @PrashantPimpale I print console so outside console is first print but How to resolve this

    – DDD
    Jan 2 at 12:17











  • What do you want to do with that variable? Wanna use in HTML or call api?

    – Prashant Pimpale
    Jan 2 at 12:18











  • @PrashantPimpale I want to use in HTML

    – DDD
    Jan 2 at 12:18











  • Just like this? --> {{rootLevelNodes | json }}

    – Prashant Pimpale
    Jan 2 at 12:20



















that is async call!

– Prashant Pimpale
Jan 2 at 12:16





that is async call!

– Prashant Pimpale
Jan 2 at 12:16













@PrashantPimpale I print console so outside console is first print but How to resolve this

– DDD
Jan 2 at 12:17





@PrashantPimpale I print console so outside console is first print but How to resolve this

– DDD
Jan 2 at 12:17













What do you want to do with that variable? Wanna use in HTML or call api?

– Prashant Pimpale
Jan 2 at 12:18





What do you want to do with that variable? Wanna use in HTML or call api?

– Prashant Pimpale
Jan 2 at 12:18













@PrashantPimpale I want to use in HTML

– DDD
Jan 2 at 12:18





@PrashantPimpale I want to use in HTML

– DDD
Jan 2 at 12:18













Just like this? --> {{rootLevelNodes | json }}

– Prashant Pimpale
Jan 2 at 12:20







Just like this? --> {{rootLevelNodes | json }}

– Prashant Pimpale
Jan 2 at 12:20














2 Answers
2






active

oldest

votes


















1














I would split the single function into two parts:



initialData() {
this.route.params.subscribe(params => {
this.upperFolderId = params['userid'];
this.urlOfFolder = params['url']+'/'+this.upperFolderId;
this.anotherFunction(this.urlOfFolder);
});
}

anotherFunction(data) {
this.userService.getPatternMainFolder({'urlOfFolder' : data}).subscribe(
(data) => {
if(data != undefined && data != '' && data.payload != undefined && data.payload != ''){
for(var i = 0 ; i < data.payload.length ; i++){
this.rootLevelNodes.push(data.payload[i].folderName);
console.log(this.rootLevelNodes);
}
}
return this.rootLevelNodes;
}
)
}





share|improve this answer


























  • I already trying return inside so it gives error like this [ts] A function whose declared type is neither 'void' nor 'any' must return a value.

    – DDD
    Jan 2 at 12:28











  • Can you split the function into two?

    – Prashant Pimpale
    Jan 2 at 12:29











  • Pashant as per parshwa answer I push and got array but now how to fetch array in second console where I got null array

    – DDD
    Jan 2 at 12:34











  • still it gives error like this (A function whose declared type is neither 'void' nor 'any' must return a value. in anotherFunction)

    – DDD
    Jan 2 at 12:40













  • Replace anotherFunction(data): DynamicFlatNode with anotherFunction(data):{}

    – Prashant Pimpale
    Jan 2 at 12:42





















1














Instead of this.rootLevelNodes = data.payload[i].folderName; do this.rootLevelNodes.push(data.payload[i].folderName);






share|improve this answer
























  • Thanks parshwa I got array but now how to get ouside scope this array that i got array null

    – DDD
    Jan 2 at 12:33













  • Can you create stackblitz?

    – Parshwa Shah
    Jan 2 at 12:36











  • Parshwa see my question's last two lines In that console I got array null but I want there where also array values

    – DDD
    Jan 2 at 12:39











  • Parshwa I dont know how to create and use stackblitz

    – DDD
    Jan 2 at 12:41











  • Try this.rootLevelNodes: string = ; in constructor and check

    – Parshwa Shah
    Jan 2 at 12:45













Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54006189%2fangular-how-to-convert-values-in-array-and-get-value-in-outside-scope%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























2 Answers
2






active

oldest

votes








2 Answers
2






active

oldest

votes









active

oldest

votes






active

oldest

votes









1














I would split the single function into two parts:



initialData() {
this.route.params.subscribe(params => {
this.upperFolderId = params['userid'];
this.urlOfFolder = params['url']+'/'+this.upperFolderId;
this.anotherFunction(this.urlOfFolder);
});
}

anotherFunction(data) {
this.userService.getPatternMainFolder({'urlOfFolder' : data}).subscribe(
(data) => {
if(data != undefined && data != '' && data.payload != undefined && data.payload != ''){
for(var i = 0 ; i < data.payload.length ; i++){
this.rootLevelNodes.push(data.payload[i].folderName);
console.log(this.rootLevelNodes);
}
}
return this.rootLevelNodes;
}
)
}





share|improve this answer


























  • I already trying return inside so it gives error like this [ts] A function whose declared type is neither 'void' nor 'any' must return a value.

    – DDD
    Jan 2 at 12:28











  • Can you split the function into two?

    – Prashant Pimpale
    Jan 2 at 12:29











  • Pashant as per parshwa answer I push and got array but now how to fetch array in second console where I got null array

    – DDD
    Jan 2 at 12:34











  • still it gives error like this (A function whose declared type is neither 'void' nor 'any' must return a value. in anotherFunction)

    – DDD
    Jan 2 at 12:40













  • Replace anotherFunction(data): DynamicFlatNode with anotherFunction(data):{}

    – Prashant Pimpale
    Jan 2 at 12:42


















1














I would split the single function into two parts:



initialData() {
this.route.params.subscribe(params => {
this.upperFolderId = params['userid'];
this.urlOfFolder = params['url']+'/'+this.upperFolderId;
this.anotherFunction(this.urlOfFolder);
});
}

anotherFunction(data) {
this.userService.getPatternMainFolder({'urlOfFolder' : data}).subscribe(
(data) => {
if(data != undefined && data != '' && data.payload != undefined && data.payload != ''){
for(var i = 0 ; i < data.payload.length ; i++){
this.rootLevelNodes.push(data.payload[i].folderName);
console.log(this.rootLevelNodes);
}
}
return this.rootLevelNodes;
}
)
}





share|improve this answer


























  • I already trying return inside so it gives error like this [ts] A function whose declared type is neither 'void' nor 'any' must return a value.

    – DDD
    Jan 2 at 12:28











  • Can you split the function into two?

    – Prashant Pimpale
    Jan 2 at 12:29











  • Pashant as per parshwa answer I push and got array but now how to fetch array in second console where I got null array

    – DDD
    Jan 2 at 12:34











  • still it gives error like this (A function whose declared type is neither 'void' nor 'any' must return a value. in anotherFunction)

    – DDD
    Jan 2 at 12:40













  • Replace anotherFunction(data): DynamicFlatNode with anotherFunction(data):{}

    – Prashant Pimpale
    Jan 2 at 12:42
















1












1








1







I would split the single function into two parts:



initialData() {
this.route.params.subscribe(params => {
this.upperFolderId = params['userid'];
this.urlOfFolder = params['url']+'/'+this.upperFolderId;
this.anotherFunction(this.urlOfFolder);
});
}

anotherFunction(data) {
this.userService.getPatternMainFolder({'urlOfFolder' : data}).subscribe(
(data) => {
if(data != undefined && data != '' && data.payload != undefined && data.payload != ''){
for(var i = 0 ; i < data.payload.length ; i++){
this.rootLevelNodes.push(data.payload[i].folderName);
console.log(this.rootLevelNodes);
}
}
return this.rootLevelNodes;
}
)
}





share|improve this answer















I would split the single function into two parts:



initialData() {
this.route.params.subscribe(params => {
this.upperFolderId = params['userid'];
this.urlOfFolder = params['url']+'/'+this.upperFolderId;
this.anotherFunction(this.urlOfFolder);
});
}

anotherFunction(data) {
this.userService.getPatternMainFolder({'urlOfFolder' : data}).subscribe(
(data) => {
if(data != undefined && data != '' && data.payload != undefined && data.payload != ''){
for(var i = 0 ; i < data.payload.length ; i++){
this.rootLevelNodes.push(data.payload[i].folderName);
console.log(this.rootLevelNodes);
}
}
return this.rootLevelNodes;
}
)
}






share|improve this answer














share|improve this answer



share|improve this answer








edited Jan 2 at 12:47

























answered Jan 2 at 12:26









Prashant PimpalePrashant Pimpale

3,70031035




3,70031035













  • I already trying return inside so it gives error like this [ts] A function whose declared type is neither 'void' nor 'any' must return a value.

    – DDD
    Jan 2 at 12:28











  • Can you split the function into two?

    – Prashant Pimpale
    Jan 2 at 12:29











  • Pashant as per parshwa answer I push and got array but now how to fetch array in second console where I got null array

    – DDD
    Jan 2 at 12:34











  • still it gives error like this (A function whose declared type is neither 'void' nor 'any' must return a value. in anotherFunction)

    – DDD
    Jan 2 at 12:40













  • Replace anotherFunction(data): DynamicFlatNode with anotherFunction(data):{}

    – Prashant Pimpale
    Jan 2 at 12:42





















  • I already trying return inside so it gives error like this [ts] A function whose declared type is neither 'void' nor 'any' must return a value.

    – DDD
    Jan 2 at 12:28











  • Can you split the function into two?

    – Prashant Pimpale
    Jan 2 at 12:29











  • Pashant as per parshwa answer I push and got array but now how to fetch array in second console where I got null array

    – DDD
    Jan 2 at 12:34











  • still it gives error like this (A function whose declared type is neither 'void' nor 'any' must return a value. in anotherFunction)

    – DDD
    Jan 2 at 12:40













  • Replace anotherFunction(data): DynamicFlatNode with anotherFunction(data):{}

    – Prashant Pimpale
    Jan 2 at 12:42



















I already trying return inside so it gives error like this [ts] A function whose declared type is neither 'void' nor 'any' must return a value.

– DDD
Jan 2 at 12:28





I already trying return inside so it gives error like this [ts] A function whose declared type is neither 'void' nor 'any' must return a value.

– DDD
Jan 2 at 12:28













Can you split the function into two?

– Prashant Pimpale
Jan 2 at 12:29





Can you split the function into two?

– Prashant Pimpale
Jan 2 at 12:29













Pashant as per parshwa answer I push and got array but now how to fetch array in second console where I got null array

– DDD
Jan 2 at 12:34





Pashant as per parshwa answer I push and got array but now how to fetch array in second console where I got null array

– DDD
Jan 2 at 12:34













still it gives error like this (A function whose declared type is neither 'void' nor 'any' must return a value. in anotherFunction)

– DDD
Jan 2 at 12:40







still it gives error like this (A function whose declared type is neither 'void' nor 'any' must return a value. in anotherFunction)

– DDD
Jan 2 at 12:40















Replace anotherFunction(data): DynamicFlatNode with anotherFunction(data):{}

– Prashant Pimpale
Jan 2 at 12:42







Replace anotherFunction(data): DynamicFlatNode with anotherFunction(data):{}

– Prashant Pimpale
Jan 2 at 12:42















1














Instead of this.rootLevelNodes = data.payload[i].folderName; do this.rootLevelNodes.push(data.payload[i].folderName);






share|improve this answer
























  • Thanks parshwa I got array but now how to get ouside scope this array that i got array null

    – DDD
    Jan 2 at 12:33













  • Can you create stackblitz?

    – Parshwa Shah
    Jan 2 at 12:36











  • Parshwa see my question's last two lines In that console I got array null but I want there where also array values

    – DDD
    Jan 2 at 12:39











  • Parshwa I dont know how to create and use stackblitz

    – DDD
    Jan 2 at 12:41











  • Try this.rootLevelNodes: string = ; in constructor and check

    – Parshwa Shah
    Jan 2 at 12:45


















1














Instead of this.rootLevelNodes = data.payload[i].folderName; do this.rootLevelNodes.push(data.payload[i].folderName);






share|improve this answer
























  • Thanks parshwa I got array but now how to get ouside scope this array that i got array null

    – DDD
    Jan 2 at 12:33













  • Can you create stackblitz?

    – Parshwa Shah
    Jan 2 at 12:36











  • Parshwa see my question's last two lines In that console I got array null but I want there where also array values

    – DDD
    Jan 2 at 12:39











  • Parshwa I dont know how to create and use stackblitz

    – DDD
    Jan 2 at 12:41











  • Try this.rootLevelNodes: string = ; in constructor and check

    – Parshwa Shah
    Jan 2 at 12:45
















1












1








1







Instead of this.rootLevelNodes = data.payload[i].folderName; do this.rootLevelNodes.push(data.payload[i].folderName);






share|improve this answer













Instead of this.rootLevelNodes = data.payload[i].folderName; do this.rootLevelNodes.push(data.payload[i].folderName);







share|improve this answer












share|improve this answer



share|improve this answer










answered Jan 2 at 12:30









Parshwa ShahParshwa Shah

533314




533314













  • Thanks parshwa I got array but now how to get ouside scope this array that i got array null

    – DDD
    Jan 2 at 12:33













  • Can you create stackblitz?

    – Parshwa Shah
    Jan 2 at 12:36











  • Parshwa see my question's last two lines In that console I got array null but I want there where also array values

    – DDD
    Jan 2 at 12:39











  • Parshwa I dont know how to create and use stackblitz

    – DDD
    Jan 2 at 12:41











  • Try this.rootLevelNodes: string = ; in constructor and check

    – Parshwa Shah
    Jan 2 at 12:45





















  • Thanks parshwa I got array but now how to get ouside scope this array that i got array null

    – DDD
    Jan 2 at 12:33













  • Can you create stackblitz?

    – Parshwa Shah
    Jan 2 at 12:36











  • Parshwa see my question's last two lines In that console I got array null but I want there where also array values

    – DDD
    Jan 2 at 12:39











  • Parshwa I dont know how to create and use stackblitz

    – DDD
    Jan 2 at 12:41











  • Try this.rootLevelNodes: string = ; in constructor and check

    – Parshwa Shah
    Jan 2 at 12:45



















Thanks parshwa I got array but now how to get ouside scope this array that i got array null

– DDD
Jan 2 at 12:33







Thanks parshwa I got array but now how to get ouside scope this array that i got array null

– DDD
Jan 2 at 12:33















Can you create stackblitz?

– Parshwa Shah
Jan 2 at 12:36





Can you create stackblitz?

– Parshwa Shah
Jan 2 at 12:36













Parshwa see my question's last two lines In that console I got array null but I want there where also array values

– DDD
Jan 2 at 12:39





Parshwa see my question's last two lines In that console I got array null but I want there where also array values

– DDD
Jan 2 at 12:39













Parshwa I dont know how to create and use stackblitz

– DDD
Jan 2 at 12:41





Parshwa I dont know how to create and use stackblitz

– DDD
Jan 2 at 12:41













Try this.rootLevelNodes: string = ; in constructor and check

– Parshwa Shah
Jan 2 at 12:45







Try this.rootLevelNodes: string = ; in constructor and check

– Parshwa Shah
Jan 2 at 12:45




















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54006189%2fangular-how-to-convert-values-in-array-and-get-value-in-outside-scope%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

MongoDB - Not Authorized To Execute Command

How to fix TextFormField cause rebuild widget in Flutter

Npm cannot find a required file even through it is in the searched directory