added clear method to jsonarray