[Solved] Invalid value type: String for Integer


Remove the quotes from around the numbers like this:

Map<String, Integer> temp = new Map<String, Integer>{'type' => 123, 'count' => 1};

EDIT:
As you changed your question completely, the best way of achieving this would be:

public List<Map<String,String>> getPhoneData() {
    List<Map<String, String>> mapp = new List<Map<String, String>>();
    Map<String, String> temp = new Map<String, String>{'type' => 'Profile Value', 'count' => '1'};
    return mapp;
}

6

solved Invalid value type: String for Integer