Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

slayt's avatar
Level 1

Removing the "name:", bracket, and quotation marks in json reesponce in Vuejs/ Vuex

Good Day Everyone :D

I just want to ask, how can I remove the "name:", bracket, and quotation marks and display only the Product Name result in the input field? Example: { "name": "Product Name" }

Here's my mutation:

set_product_name: (state, data) => { state.the_product_name = data }

Thank You in advance :D

0 likes
1 reply
Tray2's avatar

Just parse it , then you can variable.name

1 like

Please or to participate in this conversation.