Home › Forums › Add-ons › Repeater Field › Convert raw repeater data back into an array › Reply To: Convert raw repeater data back into an array
That’s interesting and it will not be easy to convert that.
this holds the field value
this holds the ACF field key reference
In this case
I am assuming this is constructed like
block- simply tells ACF that this field belongs to a block.
On to the repeater
[filter_categories_0_category] the ‘category’ field from the 1st row of the the ‘filter_categories’ repeater. This index is constructed like this
In order to build an array you would need to loop over the data and parse the array index and create what ACF usually stores in an array. You would also need to format the values.
Going to be honest, I have no idea how you’d do this, especially considering that you have multiple possible secondary sub fields dependent of the value of the first sub field.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
Are you building WordPress sites with ACF and @BeaverBuilder, and wanted to use your ACF Blocks in both the block editor and Beaver Builder?— Advanced Custom Fields (@wp_acf) May 10, 2023
The BB team recently added support for using ACF Blocks in Beaver Builder. Check it out 👇https://t.co/UalEIa5aQi
© 2023 Advanced Custom Fields.