mr_Vasyl,
<script>
var array = [];
function func(b, c) {
array.length || array.push({property : {}});
var property = array[0].property;
property[b] = c
}
func( "text1", "text2");
func( "text3", "text4");
func( "text5", "text6");
document.write(JSON.stringify(array, null, 4))
</script>