-1

my data has an object containing id with brackets i would like to access it in the template to display

this is my template

this is my vue debugger

  • Does this answer your question? [JavaScript property access: dot notation vs. brackets?](https://stackoverflow.com/questions/4968406/javascript-property-access-dot-notation-vs-brackets) – Phil Dec 20 '19 at 04:59
  • Did you not get this answered in your [previous question](https://stackoverflow.com/q/59403754/283366)? – Phil Dec 20 '19 at 04:59
  • already tried that approach, though it works in access $refs {{ req_meminfo[online_membership[first_name]] }} {{ [req_meminfo[online_membership[first_name]]] }} – Jherom Ocado De Jesus Dec 20 '19 at 05:01
  • yes I did get that for $refs but for placing the value inside the div like {{ with brackets}} , would like to achieve that as well. if this is not doable I'll just try to look for a workaround instead :) – Jherom Ocado De Jesus Dec 20 '19 at 05:04
  • 1
    Did you try using as an array notation => req_meminfo['online_membership[first_name]']. Note key is passed in string. – Riddhi Dec 20 '19 at 08:32
  • v-bind:value='req_meminfo["online_membership[first_name]"]' works, already received advised from other forum – Jherom Ocado De Jesus Dec 20 '19 at 10:46

1 Answers1

0
v-bind:value='req_meminfo["online_membership[first_name]"]' 
Kick Buttowski
  • 6,709
  • 13
  • 37
  • 58