Should be easy but google couldn't give me a straight answer. I have an array. The fields in the array have underscores that I would like to remove e.g. "Column_1" to "Column 1". Does anyone know a good way to do this without looping through the whole array and rebuilding it anew? I didn't see any methods in the reference that would make this easy. thx
R – Good way to rename fields in Actionscript array
actionscriptactionscript-3apache-flexarrays
Related Topic
- Java – What’s the simplest way to print a Java array
- Javascript – How to insert an item into an array at a specific index (JavaScript)
- Javascript – Sort array of objects by string property value
- Javascript – Loop through an array in JavaScript
- Actionscript – How to pass “Null” (a real surname!) to a SOAP web service in ActionScript 3
- Javascript – How to check if an object is an array?
- Javascript – How to remove a specific item from an array
- Javascript – For-each over an array in JavaScript
Best Answer
Depending on where you are using this Array, you could use the
labelFunction
to format the data before presenting it. It is present in Lists, DataGrids and Trees.But you'd only need this if you have a very large data and wouldn't want to loop over all the records before showing them. A
labelFunction
would "reprocess" the label everytime before it's presented.