I am trying to get the index of a specific value in an array of maps.
the map is getting data from a data class so when I try to get the index it wants all the values of the map instead of me being able to ask for the index based on one value.
Here is the array of maps.
var skillsListMain = arrayListOf(SkillsSelectPost("Drawing Experience",
"0", "Select", "0"),(SkillsSelectPost("Running Experience",
"0", "Select", "0"),
and my SkillsSelect Post
data class SkillsSelectPost(
var name: String,
var On: String,
var level: String,
var sel: String
)
I am trying to use
val name = skill["name"]!!
val index = skillsListMain.indexOf(name)
But it makes me use
val name = skill["name"]!!
val index = skillsListMain.indexOf(SkillsSelectPost(name, "", "", "")