//php array_diff_assoc replacement
func ArrayDiffAssoc(s1, s2 map[string]interface{}) map[string]interface{} {
r := make(map[string]interface{})
for k, v := range s1 {
if c, ok := s2[k]; !ok || c != v {
r[k] = v
}
}
return r
}
Register as a new user and use Qiita more conveniently
- You get articles that match your needs
- You can efficiently read back useful information
- You can use dark theme