link3014 link3015 link3016 link3017 link3018 link3019 link3020 link3021 link3022 link3023 link3024 link3025 link3026 link3027 link3028 link3029 link3030 link3031 link3032 link3033 link3034 link3035 link3036 link3037 link3038 link3039 link3040 link3041 link3042 link3043 link3044 link3045 link3046 link3047 link3048 link3049 link3050 link3051 link3052 link3053 link3054 link3055 link3056 link3057 link3058 link3059 link3060 link3061 link3062 link3063 link3064 link3065 link3066 link3067 link3068 link3069 link3070 link3071 link3072 link3073 link3074 link3075 link3076 link3077 link3078 link3079 link3080 link3081 link3082 link3083 link3084 link3085 link3086 link3087 link3088 link3089 link3090 link3091 link3092 link3093 link3094 link3095 link3096 link3097 link3098 link3099 link3100 link3101 link3102 link3103 link3104 link3105 link3106 link3107 link3108 link3109 link3110 link3111 link3112 link3113 link3114 link3115 link3116 link3117 link3118 link3119 link3120 link3121 link3122 link3123 link3124 link3125 link3126 link3127 link3128 link3129 link3130 link3131 link3132 link3133 link3134 link3135 link3136 link3137 link3138 link3139 link3140 link3141 link3142 link3143 link3144 link3145 link3146 link3147 link3148 link3149 link3150

[Vue.js] Displaying data inside multiple arrays Subscribe to RSS

So there is this data: https://i.stack.imgur.com/Sga6H.png and when displaying it like this;

<tr v-for=”cv_identifying_info in cv_identifying_infos” :key=”cv_identifying_info”>
<td>{ cv_identifying_info[‘person-info’] }</td>

Now to access the further data inside. I tried like

<td>{ cv_identifying_info[‘person-info’][‘full-name’]}</td>

and other ways but it gives me the error

Cannot read property ‘full-name’ of undefined

but how can it be undefined if could access the data using only

cv_identifying_info[‘person-info’]

?And also

Duplicate keys detected: ‘[object Object]‘. This may cause an update
error.

It’s not like there is an id or a name to do :key=”cv_identifying_info.id”

Kinda confused here, any suggestion?

Solution :

{ cv_identifying_info[‘person-info’] }

Is similar to echo cv_identifying_info[‘person-info’].

That means that you have not an array or an object there, but a string, so you can not access anything further than that.

That’s why you get this message

Cannot read property ‘full-name’ of undefined

In case $cv_identifying_info[‘person-info’][‘full-name’] existed you would get an error for

array to string conversion

using the above code but based on what you say you don’t.

That means that person-info field is not the key for a nested array but for a string value. try to print_r the root array $cv_identifying_info to see the structure of it.