javascript

  • How can i segregate the admin,role,viewer separately using angular js?
  • I’m using the above json file to fetch the data,i want to display the role separately in a block as in my display image attached

    How can work with this?

  • I have already able to use ng-tags-input to input all the roles at a single place

I’m using the above json file to fetch the data,i want to display the role separately in a block as in my display image attached

@soiqbot: How to segregate the roles accordingly using angular js from json file?

#javascript #angularjs #json

How can i segregate the admin,role,viewer separately using angular js?

I’m using the above json file to fetch the data,i want to display the role separately in a block as in my display image attached

How can work with this? I have already able to use ng-tags-input to input all the roles at a single place

var arr = [{ “_id”: “dd0af4084a0968f9301d535db”, “user”: “gdarad@gmail.com”, “role”: “Admin” }, { “_id”: “dd0af4084f6f4c84a0301d535db”, “user”: “hunam@gmail.com”, “role”: “editor” }, { “_id”: “dd0af4c84a0968f9301d535db”, “user”: “gdarad@gmail.com”, “role”: “viewer” }]; var emails = []; var users = []; var roles = []; arr.map(function(obj) { emails.push(obj._id); users.push(obj.user); roles.push(obj.role); }); console.log(users, roles, emails);

javascript

You might also like More from author

Comments are closed, but trackbacks and pingbacks are open.