SOLVED: Values from a nested array in dynamic data not working

I have a custom field with array:

Array
(
    [wpcpo-65e18ddf59ca6] => Array
        (
            [type] => checkbox
            [title] => Услуги
            [hide_title] => 1
            [desc] => 
            [options] => Array
                (
                    [wpcpo-65e18ddf59de7] => Array
                        (
                            [name] => Заказать с установкой
                            [value] => ustanovka
                            [price_type] => flat
                            [price] => 1000
                        )

                )

            [value] => 
            [limit] => 
        )

)

When I try to display it on with {cf_field:array_value|price} I see just an ‘Array’ on front-end page. Is this a bug or am I just doing something wrong?

1 Like

Hi @Illarion ,

Unfortunately, the array_value filter does not support normal custom fields {cf_xxx}, I will add this to the enhancement task so it can be used on {cf_xxx} tags as well.

However, in your case, you can’t use array_value to get nested array value even after the enhancement as Bricks will flatten the nested array value as JSON string.

Most probably you will need to write custom function to get your value.

Regards,
Jenn

Hi Illarion,

We’ve fixed this issue in Bricks 1.9.8 beta, now available as a manual download in your account (see changelog).

Please let us know if you are still experiencing issues.

As with any beta release, please do not use it on a production or live website. It is only meant for testing in a local or staging environment.

1 Like