[Vuejs]-Json string array to object in Vuex

0👍

You could map your response data as follows by parsing that string to an object :

let parsed=[];
parsed=response.data.map((item)=>{
         let tmp=item;
          tmp.settings=JSON.parse(item.settings);
        return tmp;
      });
commit('SET_STORE_CATEGORIES', parsed);

Leave a comment