var filter = {}; filter['15'] = {}; filter['15']['key'] = 'value'; filter['20'] = {}; filter['20']['ключ'] = 'значение'; result = JSON.stringify(filter); alert(result);