I agree with the other poster who said that there are not enough facts to go on here. This particular thread is for shoplifting and retail fraud inquiries. An arrest and overnight jail for a 12 year old not "caught in the act" sounds like a bizarre response from the police.
From what little there is to go on here, the one thing I can say is that a lot depends on whether your daughter has confessed to stealing or not. If not, the circumstances of finding a stolen item in a backpack in someone else's house, when your daughter is not present, is a pretty thin basis for a criminal prosecution.
You shoud definitely consult an attorney competent with juvenile defense matters. Your daughter should keep her mouth shut about this incident - even to you - until she has a chance to consult with a lawyer. This is true, by the way, even if she confessed to something already. Talking more to anybody other than her own lawyer will only mkae things worse.

