addinf a function to generate json object filled with an entry