JSFiddle - React, Tailwind, and code Playground

by takanori sugawara

Babel + JSX

const users = [
{
    id:1,
    name:'田中太郎',
    point:30,
    profile:'こんにちは',
  },
	{
    id:2,
    name:'青井花子',
    point:50,
    profile:'おはよう',
  },
  {
    id:3,
    name:'石野次郎',
    point:45,
    profile:'おやすみ',
  }
]

const target = users.find(d => d.id === 1 )
if(target) {
	target.point = 40
	target.profile = 'ハロー'
}
	
users.sort((a,b) => a.name < b.name)
console.log(users)