added functionalities. Flatten array, search array of objects etc.