6 kyu
Object Search and Replace
488 of 493tencircles
Description:
Given an object with an arbitrary number of properties, any number of which may be objects or arrays, replace all values which are strictly equal to the string: "dynamic" with a given string occurring anywhere in that object or a child object or array.
Your solution should be recursive.
Your solution should be "in place" meaning it return the original object, not a copy.
Your solution should also include some type safety. If a value that isn't an object or array is passed as the first argument, it should just return whatever was passed in.
Algorithms
Similar Kata:
Stats:
Created | Sep 26, 2013 |
Published | Sep 26, 2013 |
Warriors Trained | 1248 |
Total Skips | 178 |
Total Code Submissions | 2917 |
Total Times Completed | 493 |
JavaScript Completions | 488 |
Total Stars | 31 |
% of votes with a positive feedback rating | 90% of 115 |
Total "Very Satisfied" Votes | 98 |
Total "Somewhat Satisfied" Votes | 12 |
Total "Not Satisfied" Votes | 5 |