How to map data according to button id