I have a structure Student with one to many mapping and pushed values to it.Following is my code:
pragma solidity ^0.4.20;
struct Student{
uint id;
string name;
uint256 mark;
}
mapping(uint => Student[]) StudentDetails;
function addStudent(uint classid,uint id,string name,uint256 mark) public payable{
StudentDetails[classid].push(Student(id,name,mark));
}
Now I need to update mark field without updating id and name for each student. How it can be done? Help will be appreciated :)