<% numbers = [1, 2, 3, 4, 5, 6, 7, 8, 9]; %>
{
    "title": "Map fn + number keys to function keys",
    "rules": [
        {
            "description": "Map fn + number keys to their corresponding function keys",
            "manipulators": [
                <% numbers.each do |number| %>
                    {
                        "type": "basic",
                        "from": <%= from(number.to_s, ["fn"], []) %>,
                        "to": <%= to([["f#{number}"]]) %>
                    },
                <% end %>
                {
                    "type": "basic",
                    "from": <%= from("0", ["fn"], []) %>,
                    "to": <%= to([["f10"]]) %>
                },
                {
                    "type": "basic",
                    "from": <%= from("hyphen", ["fn"], []) %>,
                    "to": <%= to([["f11"]]) %>
                },
                {
                    "type": "basic",
                    "from": <%= from("equal_sign", ["fn"], []) %>,
                    "to": <%= to([["f12"]]) %>
                }
            ]
        }
    ]
}

<%
    remap_source_keys = [
        '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', 'hyphen', 'equal_sign'
    ];
    remap_dest_keys = [
        'f1', 'f2', 'f3', 'f4', 'f5', 'f6', 'f7', 'f8', 'f9', 'f10', 'f11', 'f12'
    ];
    manipulators = each_key(
        source_keys_list: remap_source_keys,
        dest_keys_list: remap_dest_keys,
        from_mandatory_modifiers: ["fn"],
        as_json: true
    );
%>
{
    "title": "Map fn + number keys to function keys",
    "rules": [
        {
            "description": "Map fn + number keys to their corresponding function keys",
            "manipulators": <%= manipulators %>
        }
    ]
}

Use each_key for fn+numbers to function keys
Use each_key for fn+numbers to function keys
